github dolthub/dolt v2.2.2
2.2.2

8 hours ago

Merged PRs

dolt

  • 11332: /go/cmd/dolt/cli: only emit backspace characters in a tty
    The CLI's progress spinners (dolt push, pull, fetch, assist, and import/sql progress output) redraw themselves in place by writing backspace control characters. This was done unconditionally, with no check for whether output was going to a terminal.
    When stdout/stderr is captured to a file or pipe — a script, a CI job, dolt push > push.log 2>&1 — those backspaces become literal bytes in the log instead of cursor movements. Rendering the log then "erases" the surrounding text. The worst case: an error is printed while the spinner is active, and the spinner's trailing backspaces overwrite the error text, so the captured log looks empty exactly when something went wrong.
    This PR fixes this so that TTY is detected and redraw is gated on it.
  • 11327: Add support for functional indexes with multiple expressions
    Picks up support for functional indexes with multiple expressions from GMS (dolthub/go-mysql-server#3634) and adds additional tests for Dolt.
    Depends on: dolthub/go-mysql-server#3634
  • 11326: unsafe adaptive value
  • 11325: gitblobstore: fix premature flush and prune of pending write that was not referenced in current manifest
    CheckAndPut("manifest") flushed all queued pendingWrites into the commit, regardless of whether the manifest being written referenced them. That commits a table file into the git tree as an unreferenced entry, which a later manifest flush then legitimately prunes and evicts from the in-memory cache — while the file is still live (about to be added, or being re-read by addTableFiles' refCheckAllSources retry loop). The result is Blob not found. Stale pendingWrites from earlier failed pushes in the same process keep the condition sticky, which is why a restart clears it.
    This PR only flushes the pending writes the manifest actually references. Unreferenced writes stay pending until a manifest that references them is written, so they're committed and referenced atomically. After this change a live table file is always either pending and cached (not in the tree, so unprunable) or committed and referenced (never pruned) — an unreferenced tree entry can no longer coexist with being live.
  • 11320: go: sql_server_driver: Fix a race on *SqlServer.Cmd access. Start the command before we spawn its wait goroutine.
  • 11316: go: sqle/cluster: Improve dolt_cluster_ack_writes_timeout_secs circuit breaker behavior.
    Previously, the circuit breaker only had an open and a closed state. It would only go from open to closed when the replication thread fully quiesced. This PR adds a half-open state, where it lets a single commit probe for replication success within the configured timeout. If that wait succeeds, the circuit breaker closes.
    This lets high write throughput use cases reenable their configured replication waits even when writes arrive more requently than their typical replication delay.
  • 11314: go: sqle/cluster: controller.go: Make DROP DATABASE replication participate in dolt_cluster_ack_writes_timeout_secs.
  • 11313: go: Fix some data races surfaced by running go-sql-server-driver tests under -race.
  • 11312: go/store/nbs: Fix a race between the journal persister and PruneTableFiles.
    When PruneTableFiles runs, it is willing to delete the journal file if there is no longer a reference to it in the manifest. This can race with bootstrapJournal making a new journal file. The journal file can be on disk, and seen by PruneTableFiles and thus selected for removal, before the journal has been added to the chunk store proper.
    This change makes the journal writer participate in the retained files machinery, same as the table file persister, so that the journal is correctly considered not-safe-for-delete-by-PruneTableFiles before it is ever created on disk and potentially selected for deletion by PruneTableFiles.
  • 11305: fix stats functions to include schema
    We lookup stats with empty string for schema. Since this is not always the case, we sometimes miss stats.
  • 11290: Bump golang.org/x/net v0.54.0 => v0.55.0 for Go 1.27 compatibility
    Go 1.27 change:
    $ go1.27rc1 build -v ./cmd/dolt
    google.golang.org/grpc/internal/transport
    # google.golang.org/grpc/internal/transport
    ../../../../go/pkg/mod/google.golang.org/grpc@v1.79.3/internal/transport/handler_server.go:271:18: undefined: http2.TrailerPrefix
    
    golang.org/x/net upgrade
    $ go get golang.org/x/net@v0.55.0 && go mod tidy
    go: upgraded golang.org/x/net v0.54.0 => v0.55.0
    
    Build successful:
    $ go1.27rc1 build -v ./cmd/dolt
    

go-mysql-server

  • 3634: Add support for multiple expressions in functional indexes
  • 3627: fix stats functions to include schema
    We include the schema in the stats key, but only sometimes fill in the field.
  • 3626: Prevent index offset when comparing rows in topRowsIter
    Fixes #11300
    Appending the row order number to the end of a sql.Row during a Top-N Heap Sort in topRowsIter was causing an index offset when evaluating SortFields that were subqueries, thus resulting in incorrect result.
    This PR
    • modifies topRowsHeap to instead take a rowWithOrder struct that separates out the sql.Row from the order number while still taking the order number into account when sorting the heap.
    • refactoring Sorter.LesserRow logic into a new CompareRows function to allow checking for row equality
    • moves top row(s) iterators to its own file as part of an effort to make our iterators more organized (#3620). This file also includes topRowsHeap since it is only ever used by topRowIter (see dolthub/go-mysql-server#3622 (comment) for next steps)
    • removes ValueRowSortersince it's actually never used anywhere and doesn't even fully implement sort.Interface
  • 3617: special case on extended type for getting compare type

Closed Issues

  • 11265: Dolt INSERT … SELECT with CTE + JSON_TABLE disconnects
  • 3622: Clean up: move sorters in sql/expression/sort.go out of expression package

Don't miss a new dolt release

NewReleases is sending notifications on new releases.