Gate named-blob 404->503 translation behind a config kill switch#3264
Merged
SophieGuo410 merged 1 commit intoMay 22, 2026
Merged
Conversation
PR linkedin#3234 (AMBRY-14247) translates BlobDoesNotExist to AmbryUnavailable on the named-blob GET path when metadata exists but storage replicas return NOT_FOUND. The PR's own risk note flags retry-storm amplification on the inconsistency path. Add router.named.blob.translate.not.found.to.unavailable.enabled (default true) so the behavior can be disabled per-cluster without a code rollback. The observability counter still increments when disabled so the underlying event rate remains visible. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3264 +/- ##
=============================================
- Coverage 64.24% 51.23% -13.01%
+ Complexity 10398 8678 -1720
=============================================
Files 840 931 +91
Lines 71755 79544 +7789
Branches 8611 9526 +915
=============================================
- Hits 46099 40757 -5342
- Misses 23004 35409 +12405
- Partials 2652 3378 +726 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if (e instanceof RouterException | ||
| && ((RouterException) e).getErrorCode() == RouterErrorCode.BlobDoesNotExist) { | ||
| routerMetrics.namedBlobMetadataExistsButStorageNotFoundCount.inc(); | ||
| if (!routerConfig.routerNamedBlobTranslateNotFoundToUnavailableEnabled) { |
Contributor
There was a problem hiding this comment.
why don't we just use the config to gate the translateNamedBlobMissingInStorage method?
Contributor
Author
There was a problem hiding this comment.
Added the clause here so that the metric on the above line namedBlobMetadataExistsButStorageNotFoundCount still increments when the config is disabled, so that we still have insight into it whenever the metadata-vs-storage divergence happens.
SophieGuo410
approved these changes
May 22, 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.
Summary
PR #3234 (AMBRY-14247) changed the named-blob GET path to translate
BlobDoesNotExist->AmbryUnavailable(HTTP 503) when the named-blob metadata row exists but every storage replica returnsBlobNotFound. The PR's own risk note flags potential retry-storm amplification on the inconsistency path, since the implicit 404 circuit-breaker is removed.This adds a kill switch so the behavior can be disabled per-cluster without a code rollback.
router.named.blob.translate.not.found.to.unavailable.enabled(defaulttrue, preserves current behavior).false,NonBlockingRouter.translateNamedBlobMissingInStoragereturns the originalBlobDoesNotExistunchanged.namedBlobMetadataExistsButStorageNotFoundCountstill increments when the config is disabled so the underlying event rate remains visible during/after a rollback.Testing Done
testNamedBlobMissingInStorageNotTranslatedWhenConfigDisabledwhich sets the config tofalse, drives storage toBlobNotFound, and asserts the surfaced error isBlobDoesNotExistwhile the counter still increments.setUpNamedBlobAndPutto accept customProperties; existing call sites unchanged.true).Risk
Default is unchanged behavior, so this is a no-op rollout. Setting the new flag to
falserestores the pre-#3234 behavior (404 surfaces to clients) on the inconsistency path only; the metric remains visible either way.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com