Merged
Conversation
cho-m
approved these changes
Feb 10, 2026
Contributor
|
🤖 An automated task has requested bottles to be published to this PR. Caution Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch. |
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.
Created by
brew bumpCreated with
brew bump-formula-pr.Details
release notes
Implements GitBlobstore.Concatenate with CAS-safe commits, chunked output support via MaxPartSize, and end-to-end tests to enable NBS blobstore persister/conjoin paths.
Previously, this lock would accidentally allow concurrent access to writing the database working set value because a non-normalized database name like
db/main\x00/refs/heads/mainwould allow access along with a normalized database name likedb\x00/refs/heads/main. This did not impact correctness, since the working sets are safe for concurrent modification at the storage layer, but it could cause transient failures for a client if the optimistic lock retries failed sequentially enough times.Here we fix the bug so that the txLocks serialize access to the ref heads as expected.
DoltTable.ProjectedTags()to distinguish between no setprojectedColsand zeroprojectedColsfixes #10451
When getting
ProjectedTags(), we were not distinguishing between whenprojectedColswasnil(meaning no projections are set so we should return all columns) and whenprojectedColswas an empty array of length 0 (meaning the table has been pruned to be zero columns but we still care about the number of rows), since in both cases,projectedColswould have a length of 0. This was causingLEFT OUTER JOINs that didn't project any left-side columns to not return the correct number of columns. This was fixed by checking for ifprojectedColswasnilinstead (which is what we do in other functions likeProjections()andHistoryTable.ProjectedTags()Also some minor refactorings:
getItatogetIndexedTableAccessgetSourceKvTest added in dolthub/go-mysql-server#3424
Addresses feedback on #10442 to reduce GC churn in the
BlockOnLockretry loop. The original implementation allocated a new timer on each iteration viatime.After(), causing unnecessary memory pressure when locks are held for extended periods.Changes
lockRetryIntervalconstant: Extracts hardcoded 10ms retry interval into a named constant for clarity and tunabilitytime.Afterwith lazy-initializedtime.Ticker: Single ticker instance reused across all retries, eliminated per-iteration allocationsBefore
After
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
This PR introduces
GitBlobstore, a Blobstore implementation backed by a git repository’s object database (bare repo or .git dir). Keysare stored as paths in the tree of a commit pointed to by a configured ref (e.g. refs/dolt/data), enabling Dolt remotes to be hosted on
standard git remotes.
High-level design
• Storage model
• Each blobstore key maps to a git tree path under the ref’s commit.
• Small objects are stored as a single git blob at .
• Large objects (when chunking enabled) are stored as a git tree at containing part blobs:
• /00000001, /00000002, … (lexicographically ordered)
• No descriptor header / no stored total size; size is derived by summing part blob sizes.
• Roll-forward only: this PR supports the above formats; it does not include backward-compat for any older descriptor-based chunking
formats.
• Per-key versioning
• Get/Put/CheckAndPut return a per-key version equal to the object id at :
• inline: blob OID
• chunked: tree OID
• Idempotent
Put• For non-
manifestkeys, Put fast-succeeds if already exists (assumes content-addressed semantics common in NBS/table files),returning the existing per-key version without consuming the reader.
• manifest remains mutable and is updated via CheckAndPut.
•
CheckAndPutsemantics• CheckAndPut performs CAS against the current per-key version at (not against the HEAD commit hash).
• Implementation uses a ref-level CAS retry loop:
• re-checks version at current HEAD
• only consumes/hashes the reader after the expected version matches
• retries safely if the ref advances due to unrelated updates
• Blob↔tree transitions
• Handles transitions between inline blob and chunked tree representations by proactively removing conflicting index paths before
staging new entries (avoids git index file-vs-directory conflicts).
Internal git plumbing additions
Adds/uses a unified internal GitAPI abstraction to support:
• resolving path objects and types (blob vs tree)
• listing tree entries for chunked reads
• removing paths from the index in bare repos
• staging and committing new trees, with configurable author/committer identity fallback
CheckAndPutCAS semantics + add testsThis PR adds the next write-path primitive to GitBlobstore:
CheckAndPutwith proper compare-and-swap behavior, and a focused test suite (including a concurrency/CAS-failure scenario).This PR mainly addresses the need to perform type conversions when performing index lookups when determining whether a diff introduces a foreign key constraint violation. The old code assumed that the key values were binary identical between parent and child table, and this isn't always the case (esp in Doltgres).
Also fixes a related bug in constructing the primary key from a secondary key, which occurs when a secondary index contains primary key columns.
go-mysql-server
ColumnIds forEmptyTableFixes dolthub/dolt#10434
EmptyTableimplementsTableIdNodeso it was usingColumns()to get theColumnIds.EmptyTable.WithColumns()is only ever called for testing purposes; as a result, theColSetreturned is empty. This causes the column toColumnIdmapping to be incorrectly off set, leading to the wrong index id assigned.This fix adds a case for
EmptyTableincolumnIdsForNodeto add placeholderColumnIdvalues so the mappings are correctly aligned. I considered setting the actualColSetforEmptyTablebut there's actually not a good way to do that. Regardless, the index id will be set either using the name of the column or using the Projector node that wraps the EmptyTable.Similar to
SetOp,EmptyTableprobably shouldn't be aTableIdNode(see dolthub/dolt#10443)fixes dolthub/dolt#10304
Despite what the comment said, it's not safe to join remaining tables with CrossJoins during
buildSingleLookupPlan. It is only safe to do so if every filter has been successfully matched tocurrentlyJoinedTables. Otherwise, we end up dropping filters.For example, we could have a query like
select from A, B, inner join C on B.c0 <=> C.c0where table A has a primary key and tables B and C are keyless.columnKeymatches A's primary key column and A would be added tocurrentlyJoinedTables. Since the only filter references B and C and neither are part ofcurrentlyJoinedTabes, nothing is ever added tojoinCandidates. However, it's unsafe to join all the tables with CrossJoins because we still need to account for the filter on B and C.fixes dolthub/dolt#10284
part of dolthub/dolt#10340
benchmarks
Closed Issues
ColumnId's not added forEmptyTableduringassignExecIndexes, causing offset when getting column indexView the full release notes at https://github.com/dolthub/dolt/releases/tag/v1.81.7.