Skip to content

Honor named blob retirement on GET and LIST when enabled - #3314

Merged
jitheshtr merged 2 commits into
linkedin:masterfrom
jitheshtr:jirajan/named-retirement-reads
Dec 1, 2026
Merged

jitheshtr merged 2 commits into
linkedin:masterfrom
jitheshtr:jirajan/named-retirement-reads

Conversation

@jitheshtr

@jitheshtr jitheshtr commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor
Order PR Status Runtime effect
1 Transaction executor ✅ Merged Preserves known transaction outcomes.
2 Exact-version manifests ✅ Merged Adds the store; no frontend caller.
3a Migration safety ✅ Merged Runbook and integration coverage.
3b (you are here) Retirement-aware reads Open Gated GET, LIST and PUT changes.
3c Bounded retirement Open Adds an exact-retry handle; no frontend caller.

Summary

  1. Review PUT first. The conditional INSERT rejects versions at or below a committed retirement fence on the same name. On a fixed Connector/J session, PUT reads the server's autocommit, isolation default and active transaction status before the non-upsert lookup or INSERT. Rejected checkouts are discarded, not committed or recycled.
  2. Ordinary and include-expired GET return Deleted on a selected retired version, regardless of frontend clock skew. Include-deleted and include-all GET can retrieve that exact root. All six prefix/no-prefix LIST paths omit fenced selections before pagination. No-prefix options 2/3 retain their ordinary expiry fallback.
  3. The flag defaults off. When enabled, writable pools, including remote fallbacks, initialize physical connections at REPEATABLE READ. Do not install next-transaction isolation overrides after initialization. Even without retirements, PUTs in the same index gap can deadlock. Only an upsert retries, once, with the same version and fence check after a confirmed rollback (1213/40001). A create-only victim returns 503 rather than reusing a stale existence check. No retry follows a timeout or lost reply.

Review just this layer. Before enabling, verify acknowledged retirements are visible at every serving, fallback and promotion endpoint. Measure same-key and sequential-key PUT contention, DELETE and TTL contention on the shared pools, and large-container LIST plans and latency. Publication separately requires a fixed session with autocommit off and validated isolation. After publication, stop publishing to roll back; keep fences enforced, legacy DELETE and cleaners excluded, and old readers out of rotation.

Testing Done

./gradlew --offline --no-daemon --max-workers=2 -q :ambry-named-mysql:test --tests '*MySqlNamedBlobDbTest' --tests '*MySqlNamedBlobDbFactoryTest' --tests '*NamedBlobManifestStoreTest' :ambry-named-mysql:intTest --tests '*NamedBlobManifestStoreIntegrationTest' — 30 unit and 30 integration tests passed, none skipped (Java 17, private MySQL 8.0.46). With the production writer pool, the contention tests assert one deadlock in each case: the recovered upsert counts no insert error; the failed create-only PUT counts one.

Require green broad CI and an executed manifest gate on the merge candidate.

Generated with GitHub Copilot CLI

@codecov-commenter

codecov-commenter commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.22222% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.41%. Comparing base (52ba813) to head (d81c87a).
⚠️ Report is 434 commits behind head on master.

Files with missing lines Patch % Lines
.../java/com/github/ambry/named/MySqlNamedBlobDb.java 80.82% 7 Missing and 7 partials ⚠️
...om/github/ambry/named/MySqlNamedBlobDbFactory.java 80.00% 1 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (52ba813) and HEAD (d81c87a). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (52ba813) HEAD (d81c87a)
3 2
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3314       +/-   ##
=============================================
- Coverage     64.24%   31.41%   -32.84%     
+ Complexity    10398     5984     -4414     
=============================================
  Files           840      941      +101     
  Lines         71755    81353     +9598     
  Branches       8611     9876     +1265     
=============================================
- Hits          46099    25553    -20546     
- Misses        23004    53711    +30707     
+ Partials       2652     2089      -563     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jitheshtr and others added 2 commits December 1, 2026 11:50
Keep retired versions hidden from ordinary GET and LIST. On a verified writer session, reject PUT versions at or below a fence. Retry only a confirmed deadlocked upsert, once. Leave enforcement disabled by default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the staging fixtures with direct publication while keeping transaction control in the concurrent PUT test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jitheshtr
jitheshtr force-pushed the jirajan/named-retirement-reads branch from a4eaaad to d81c87a Compare December 1, 2026 19:54
@jitheshtr
jitheshtr merged commit c60d419 into linkedin:master Dec 1, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants