You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR is being tested for performance. Please allow ~12 mins for this to complete. If this PR does not result in a performance regression, the performance_approved label will be automatically added to this PR.
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces snapshot-consistent reads for GitBlobstore to ensure that NBS conjoin operations see a consistent view of the underlying git repository even when concurrent remote updates occur. The implementation adds a new Snapshotter interface that GitBlobstore implements, providing read-only snapshots that pin a specific git commit and its path-to-OID index.
Changes:
Added Snapshotter and ReadOnlySnapshot interfaces to the blobstore package for snapshot-consistent read operations
Implemented Snapshot() method on GitBlobstore that creates a read-only view pinned to a specific git commit with cached path index
Updated NBS blobstorePersister.ConjoinAll() to use snapshots when available, ensuring consistent reads during the conjoin operation
Refactored syncForRead into syncForRead and syncForReadLocked to support snapshot creation under existing lock
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File
Description
go/store/blobstore/blobstore.go
Defines new Snapshotter and ReadOnlySnapshot interfaces for snapshot-consistent reads
go/store/blobstore/git_blobstore.go
Refactors sync logic to support snapshot creation under lock, adds snapshot index caching fields
go/store/blobstore/git_blobstore_snapshot.go
Implements snapshot functionality with git ls-tree index parsing and read operations
go/store/nbs/bs_persister.go
Updates ConjoinAll to use snapshots for consistent reads, adds blobstoreReader interface
go/store/blobstore/git_blobstore_test.go
Adds comprehensive test verifying snapshot stability across remote advances
go/store/nbs/conjoiner_test.go
Adds integration test for conjoin with concurrent remote updates
coffeegoddd
changed the title
GitBlobstore: add snapshot-consistent reads and use them for NBS conjoin
GitBlobstore: add always-on pinned read cache
Feb 10, 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
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.
Make GitBlobstore cache fetches.