Skip to content

GitBlobstore: add cache#10466

Merged
coffeegoddd merged 6 commits intomainfrom
db/map
Feb 11, 2026
Merged

GitBlobstore: add cache#10466
coffeegoddd merged 6 commits intomainfrom
db/map

Conversation

@coffeegoddd
Copy link
Copy Markdown
Contributor

@coffeegoddd coffeegoddd commented Feb 10, 2026

Make GitBlobstore cache fetches.

@github-actions
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coffeegoddd
Copy link
Copy Markdown
Contributor Author

@coffeegoddd DOLT

comparing_percentages
100.000000 to 100.000000
version result total
e530687 ok 5937471
version total_tests
e530687 5937471
correctness_percentage
100.0

@coffeegoddd 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
@coffeegoddd
Copy link
Copy Markdown
Contributor Author

@coffeegoddd DOLT

comparing_percentages
100.000000 to 100.000000
version result total
e990bb6 ok 5937471
version total_tests
e990bb6 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor Author

@coffeegoddd DOLT

comparing_percentages
100.000000 to 100.000000
version result total
77b1683 ok 5937471
version total_tests
77b1683 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor Author

@coffeegoddd DOLT

comparing_percentages
100.000000 to 100.000000
version result total
6953aac ok 5937471
version total_tests
6953aac 5937471
correctness_percentage
100.0

@coffeegoddd coffeegoddd changed the title GitBlobstore: add always-on pinned read cache GitBlobstore: add cache Feb 11, 2026
@coffeegoddd coffeegoddd merged commit 94fa063 into main Feb 11, 2026
24 of 27 checks passed
@coffeegoddd coffeegoddd deleted the db/map branch February 11, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants