-
Notifications
You must be signed in to change notification settings - Fork 554
Handle detached blobs more similarly to other blobs (take 2) #25315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modifies how detached blobs are tracked in the blob manager's redirect table to improve consistency and reduce special cases. Instead of storing detached blobs as pseudoId -> undefined
, they are now tracked as localId -> pseudoId
and updated to localId -> storageId
at attach time.
- Changes redirect table type from
Map<string, string | undefined>
toMap<string, string>
- Updates blob manager methods to work with the new redirect table structure
- Adds regression test for blob storage ID compatibility
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
gcSweepAttachmentBlobs.spec.ts | Fixes test assertion logic |
blobs.spec.ts | Updates test to compare full summary tree structure |
blobManager.spec.ts | Updates redirect table references and test expectations |
blobHandles.spec.ts | Renames localBlobIdGenerator to localIdGenerator |
containerRuntime.ts | Updates method call to patchRedirectTable |
blobManagerSnapSum.ts | Removes undefined handling from redirect table type |
blobManager.ts | Core implementation changes for new redirect table handling |
Comments suppressed due to low confidence (1)
packages/runtime/container-runtime/src/test/blobManager.spec.ts:1
- The test comment indicates this is only 'to appease an assert', but the test should verify the actual behavior being tested rather than just satisfying preconditions.
/*!
Second attempt at #25171 that was reverted due to failures in the Loop integration pipeline. Old documents rely on the identity entries of the redirect table, because handles created after attach used to directly reference the storage ID rather than a local ID. I've restored the identity mappings, plus added a regression test. Also added a lot of comments to detail this historical context.
AB#45943
This PR changes how we track blobs that are created while the container is detached.
pseudoId -> undefined
and at attach we update them topseudoId -> storageId
wherepseudoId
is their index in the MemoryBlobStorage array.localId -> pseudoId
and at attach updated tolocalId -> storageId
.getBlob()
to be less-special-cased, and allows us to tighten up the typing of theredirectTable
. In several places we can stop passing/checking theattachState
.