Attribute wrapped blob-hydration failures to their inner cause - #2077
Merged
tyrielv merged 1 commit intoAug 6, 2026
Merged
Conversation
tyrielv
force-pushed
the
tyrielv/hydration-retryable-unwrap
branch
from
August 5, 2026 21:29
c5d0f3e to
c788f02
Compare
RetryableException wraps its real cause in InnerException. The blob- hydration failure categorization checked the RetryableException type itself, so every RetryableException - the largest hydration failure bucket in the field - was tagged NetworkUnavailable, even when the real cause was local disk/IO. On this branch the RetryableException reaches OnFailure from Context.Repository.TryCopyBlobContentStream - typically StreamUtil wrapping an IOException while reading a corrupt or truncated local loose object. Unwrap RetryableException.InnerException before categorizing, and map IOException / UnauthorizedAccessException / Win32Exception (the local disk/IO family) to LocalIO. A RetryableException whose inner cause is not local (e.g. HttpRequestException), or that has no inner cause, stays NetworkUnavailable. Telemetry metadata only; no behavior change. Add unit tests for each inner-cause mapping (IOException, Unauthorized- AccessException, Win32Exception -> LocalIO; HttpRequestException and no inner -> NetworkUnavailable), and reset the process-global RetryCircuitBreaker in the fixture SetUp and TearDown so these failure- driving tests cannot open the circuit for one another or for a later fixture. Stacked follow-up to PR microsoft#2071; do not publish until microsoft#2071 merges. Assisted-by: Claude Opus 4.8 Signed-off-by: Tyrie Vella <tyrielv@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tyrielv
force-pushed
the
tyrielv/hydration-retryable-unwrap
branch
from
August 5, 2026 23:00
c788f02 to
13794ab
Compare
tyrielv
marked this pull request as ready for review
August 5, 2026 23:01
tyrielv
enabled auto-merge
August 5, 2026 23:26
Keith Klein (KeithIsSleeping)
approved these changes
Aug 6, 2026
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.
What
Attribute a wrapped blob-hydration failure to its real inner cause when categorizing telemetry.
RetryableExceptioncarries the real cause inInnerException. TheBlobHydrationFailureCategorylogic added in #2071 checked the
RetryableExceptiontype itself:RetryableExceptionis not anIOException, so everyRetryableExceptionwas taggedNetworkUnavailable- even when it wrapped a local disk/IO cause. This over-counts the"external / network" slice and under-counts
LocalIO.This matters because
RetryableExceptionis the largest blob-hydration failure bucket in thefield (~255 os.2020 mount machines, ~2.85M events in 30 days).
Change
RetryableException.InnerExceptionbefore categorizing.IOException/UnauthorizedAccessException/Win32Exception(the local disk/IO family) toLocalIO.RetryableExceptionwhose inner cause is not local (e.g.HttpRequestException), or that has noinner cause, stays
NetworkUnavailable.split is unchanged.
Which path actually reaches this branch
On this branch the
RetryableExceptionarrives fromContext.Repository.TryCopyBlobContentStream-typically
StreamUtilwrapping anIOExceptionwhile reading a corrupt or truncated local looseobject (or the ProjFS write callback failing). Note: a
RetryableExceptionthrown while writinga loose object (e.g. a full disk during download) is caught by the inner download retrier and
surfaces as
DownloadFailed(no exception on the outer handler), so it does not reach thisbranch.
UnauthorizedAccessException/Win32Exceptionare mapped toLocalIObecause they belongto the same local disk/IO family.
Testing
IOException,UnauthorizedAccessException,Win32Exception->LocalIO;HttpRequestException(non-local inner) and a bare no-innerRetryableException->NetworkUnavailable.RetryCircuitBreakerin bothSetUpandTearDownsothese failure-driving tests cannot open the circuit for one another or leave it dirty for a later
fixture.
Rollout note (metadata distribution)
This moves a large volume of failures from
NetworkUnavailabletoLocalIO. The dashboard foldsboth into "external", so the external-vs-actionable split is unaffected, but any per-category
NetworkUnavailable/LocalIOtrend or alert will show a one-time step change at the deployboundary. Annotate the boundary and re-baseline per-category thresholds before using this data for a
release-readiness comparison. Fully reversible (pure metadata).
Relationship to #2071
Follow-up to #2071 (now merged), which introduced
BlobHydrationFailureCategory. This branch hasbeen rebased onto
master, so the diff is just the unwrap change (two files).Companion
Consumes the
BlobHydrationFailureCategorytag from #2071. The dashboard-side split that reads thesetags is EngSys PR 16223444 in
devprod.git.telemetry.