Add BlobId v7 with migration destination bit#3206
Merged
j-tyler merged 3 commits intolinkedin:masterfrom Apr 1, 2026
Merged
Conversation
BlobId v6 has no field to denote backend identity at write time, which makes migration to a new backend infrastucture ambiguous. Add BlobId v7 and reserve the top flag bit for migration destination (AMBRY/NON_AMBRY) while keeping v6-style compact UUID encoding. Keep pre-v7 behavior unchanged by defaulting migration metadata to UNKNOWN and reject UNKNOWN for v7 constructors/craft APIs. Also allow router.blobid.current.version=7 and add coverage for router config bounds, v7 serde, craft behavior, and migration destination validation.
Add Javadoc to each MigrationDestination enum value, clarifying the role of UNKNOWN as a sentinel for pre-V7 blob IDs. Fix testUuidBytesArrayMatchesForSameUuid to pass referenceMigrationDestination to both blob constructors instead of only one. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace direct Base64.decodeBase64() call with the existing Utils.base64DecodeUrlSafe() utility which provides a fast-path via Java 8's URL decoder with Apache Commons fallback for legacy data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dca47d9 to
bc5cf87
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3206 +/- ##
============================================
+ Coverage 64.24% 69.86% +5.62%
- Complexity 10398 12843 +2445
============================================
Files 840 930 +90
Lines 71755 79222 +7467
Branches 8611 9477 +866
============================================
+ Hits 46099 55349 +9250
+ Misses 23004 20928 -2076
- Partials 2652 2945 +293 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
BlobId v6 has no field to denote backend identity at write time, which makes migration to a new backend infrastucture ambiguous.
Add BlobId v7 and reserve the top flag bit for migration destination (AMBRY/NON_AMBRY) while keeping v6-style compact UUID encoding. Keep pre-v7 behavior unchanged by defaulting migration metadata to UNKNOWN and reject UNKNOWN for v7 constructors/craft APIs.
Also allow router.blobid.current.version=7 and add coverage for router config bounds, v7 serde, craft behavior, and migration destination validation.
Testing Done
Added new tests to cover all changes.