Prepare v2.1.2 release#142
Merged
Merged
Conversation
…rands Combine(a, b) returned the non-empty operand instance directly when the other operand was empty, so the result shared state with its input. Combine and the + operator now always return a new independent instance. Added unit tests proving Clone independence and that Combine no longer aliases its operands.
GHCN downloads had slowed from about 2 seconds to over 2 minutes, and commit bf0f28d had raised the GHCN per-attempt timeout to 240 seconds on the belief that NOAA NCEI takes that long to send response headers. Measurement showed the server is not slow: www.ncei.noaa.gov now publishes six IPv6 (AAAA) DNS records, and on networks that silently drop IPv6 traffic every HttpClient connection walked all six dead addresses sequentially (about 21 seconds of TCP timeout each, 126 seconds measured on both net481 and net10) before reaching a working IPv4 address, while curl fetched the same station file in under 2 seconds. api.waterdata.usgs.gov carries two AAAA records (about 42 seconds); the other providers have none, which is why GHCN was hit worst. The fix makes every downloader connection prefer IPv4 while keeping IPv6 as a fallback. On modern targets a SocketsHttpHandler.ConnectCallback resolves DNS, orders IPv4 first, and bounds each address attempt at 5 seconds. On .NET Framework, where the handler offers no connect hook, a ServicePoint BindIPEndPointDelegate throws for IPv6 remote endpoints so the service point skips immediately to IPv4; this is guarded by Socket.OSSupportsIPv4 so IPv6-only machines keep working. Cold-connection time to first byte drops from 126 seconds to under half a second on both stacks. With connects fixed, the GHCN timeout returns to 60 seconds and its remark no longer blames NCEI. Also included: BOM reuses one static browser-headered client instead of building two clients per call, so the station lookup and values request share pooled connections; Series.Clear() no longer removes elements one at a time through two full equality scans each (O(n squared) on a 50k-point download, the parse-side cost behind f522295's dedup pass); and Series.RemoveAt(index) now removes the requested index instead of the first equal element, which silently deleted the wrong ordinate when duplicate values existed. Verified with 1789 deterministic tests and 31 live integration tests passing on both net481 and net10.0, plus new unit tests for the address ordering, the bind delegate, and the Series contracts. The GHCN full-period integration tests now carry 60-second ceilings so a connect regression fails loudly instead of quietly taking minutes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RunningStatistics.Clone()and fixCombine()/+aliasing when one operand is empty.Validation
dotnet restoredotnet build Numerics/Numerics.csproj -c Release /p:Version=2.1.2dotnet test -c ReleasewithVSTEST_CONNECTION_TIMEOUT=600dotnet pack Numerics/Numerics.csproj -c Release /p:Version=2.1.2 --no-build -o ./packagespackages/RMC.Numerics.2.1.2.nupkgmetadata and confirmed version2.1.2, rootREADME.md, and the NuGet release notes.