Commit Graph

29040 Commits

Author SHA1 Message Date
angelamayxie 2ee439e93c Merge pull request #10357 from dolthub/angela/temptables
Prevent temporary table name collisions
2026-01-22 16:12:40 -08:00
angelamayxie 06b39912e9 remove unnecessary variable name change 2026-01-22 15:27:35 -08:00
angelamayxie d7e41934b2 okay to create non-temporary tables with the same name as temporary tables 2026-01-22 15:19:05 -08:00
angelamayxie 1af63069af nit: whitespace 2026-01-22 14:41:40 -08:00
angelamayxie 8ea0595b8e Merge branch 'main' of https://github.com/dolthub/dolt into angela/temptables 2026-01-22 14:39:32 -08:00
angelamayxie 3e7e0ec633 nit: add empty line back 2026-01-22 14:39:26 -08:00
angelamayxie b8f37c2326 add back name collision check 2026-01-22 14:37:01 -08:00
angelamayxie 0c3109dc3a add test script 2026-01-22 14:18:55 -08:00
angelamayxie e024158c64 check for temporary tables before creating dolt table 2026-01-22 14:04:19 -08:00
James Cor ac48b845a2 [no-release-notes] use InspectWithOpaque (#10350) 2026-01-22 13:25:22 -08:00
angelamayxie fd06101159 check for existing temporary table before creating new temporary table, refactor temporary tables to use 2d map 2026-01-22 13:05:50 -08:00
Neil Macneale IV e8387cdbb0 Merge pull request #10349 from dolthub/macneale4-claude/rebase-non-ii
Remove requirement for -i in dolt_rebase
2026-01-22 11:18:41 -08:00
Neil Macneale IV 1ef50d8004 PR Feedback 2026-01-22 10:14:12 -08:00
Nathan Gabrielson b1c95c8987 Merge pull request #10274 from dolthub/nathan/stashApply
`dolt stash apply`
2026-01-22 12:55:08 -05:00
Nathan Gabrielson bd67cf24de small status.go fixes 2026-01-22 09:19:19 -08:00
Nathan Gabrielson e150e02546 Neil feedback 2026-01-22 09:19:19 -08:00
Nathan Gabrielson 9a483ff402 typo in bats test 2026-01-22 09:19:19 -08:00
Nathan Gabrielson 59aed48f07 Tests and CLI stuff 2026-01-22 09:19:19 -08:00
Nathan Gabrielson 5792316d6d add apply 2026-01-22 09:19:19 -08:00
Nick Tobey 6b5d5373d1 Merge pull request #10227 from codeaucafe/codeaucafe/5862/make-ignore-system-table
dolthub/dolt#5862: Add ignore system table
2026-01-22 00:41:21 -08:00
coffeegoddd c7aae5233e [ga-bump-release] Update Dolt version to 1.81.1 and release v1.81.1 v1.81.1 2026-01-22 01:03:43 +00:00
Neil Macneale IV 5f2a48f801 better test, removed dumb comments 2026-01-21 16:33:07 -08:00
angelamayxie 109baac3b4 Merge pull request #10348 from dolthub/jycor-2f050772
[auto-bump] [no-release-notes] dependency by jycor
2026-01-21 16:26:14 -08:00
Zach Musgrave c2e3cbe475 Merge pull request #10347 from dolthub/zachmu/merge-bug
fixed output bug for foreign key constraints
2026-01-21 16:19:21 -08:00
Neil Macneale IV 1c3ad069cb Remove requirement for -i in dolt_rebase 2026-01-21 23:44:43 +00:00
jycor 7c34c0ae4a [ga-bump-dep] Bump dependency in Dolt by jycor 2026-01-21 23:42:32 +00:00
zachmu cbde862f7b [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh 2026-01-21 23:29:46 +00:00
Zach Musgrave 36463bb278 Merge branch 'zachmu/merge-bug' of github.com:dolthub/dolt into zachmu/merge-bug 2026-01-21 15:20:42 -08:00
Zach Musgrave 60f0c5241d fixed test 2026-01-21 15:16:07 -08:00
zachmu c135f26c43 [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh 2026-01-21 22:54:35 +00:00
angelamayxie dc2925e303 Merge pull request #10346 from dolthub/angelamayxie-ecc57d5a
[auto-bump] [no-release-notes] dependency by angelamayxie
2026-01-21 13:03:03 -08:00
angelamayxie 2b6619aeb5 [ga-bump-dep] Bump dependency in Dolt by angelamayxie 2026-01-21 20:25:17 +00:00
Dustin Brown f92cbd9360 [auto-bump] [no-release-notes] dependency by fulghum (#10344) 2026-01-21 12:08:08 -08:00
Zach Musgrave 59cf9143e9 fixed output bug for foreign key constraints 2026-01-21 11:53:00 -08:00
coffeegoddd 4729531fe9 [ga-bump-release] Update Dolt version to 1.81.0 and release v1.81.0 v1.81.0 2026-01-21 02:00:57 +00:00
angelamayxie bd26f10efa Merge pull request #10337 from dolthub/angelamayxie-a47af5c8
[auto-bump] [no-release-notes] dependency by angelamayxie
2026-01-20 17:32:36 -08:00
Aaron Son 5b46ec56a4 Merge pull request #10341 from dolthub/aaron/fix-10331-no-truncate-on-read-only-journal-open
go/store/nbs: Fix possible data loss from Dolt CLI utilization when executing against a running server that was in the process of writing to its journal file.
2026-01-21 02:31:27 +01:00
Aaron Son 27882102d2 Merge pull request #10326 from dolthub/aaron/sql-server-check-for-env-load-error
go: Add some error checks for previously dropped errors in Filesys.Iter calls.
2026-01-21 02:28:39 +01:00
Aaron Son bbb46c269b integration-tests/go-sql-server-driver: repro_10331_test.go: Add a regression test for #10331. 2026-01-20 16:21:35 -08:00
Aaron Son 1dae7661a3 integration-tests/bats: Update bats tests which are checking for dolt working without write perms to still have read perms on the directory. 2026-01-20 15:55:56 -08:00
Aaron Son 2cd3b92813 Merge remote-tracking branch 'origin/main' into aaron/sql-server-check-for-env-load-error 2026-01-20 14:55:38 -08:00
Aaron Son ffef6e92d7 go/store/nbs: Fix possible data loss from Dolt CLI utilization when executing against a running server that was in the process of writing to its journal file.
Since Dolt v1.78.5, Dolt has truncated the journal file to the latest successfully loaded record when it successfully loads a database. This is the correct behavior when the CLI is operating as the exclusive writer to the database. However, Dolt also has a mode where it can load the database in read-only mode. Due to a bug, Dolt was also truncating the journal file when it was operating in this mode. The end result was the running something like `dolt sql -r csv -q ...` against a Dolt database that was running a sql-server and was currently accepting writes could incorrectly truncate the journal file. The Dolt sql-server process would go ahead writing into the journal at its previously extended offset and the space between the truncation and the next write offset would be 0 filled by the operating system. Attempting to load the database later or accessing the chunks located at that corrupted portion of the journal file would result in checksum errors or failure to load messages.

This change correctly updates Dolt to only Truncate the journal file when we are loading it in read-write mode.
2026-01-20 14:46:25 -08:00
angelamayxie 4e630adbf0 [ga-bump-dep] Bump dependency in Dolt by angelamayxie 2026-01-20 18:54:40 +00:00
Aaron Son 383b107d79 Merge pull request #10319 from dolthub/aaron/oldgen-sync-manifest-writes
go/store/nbs: file_manifest.go: Always make manifest writes crash safe. Remove optional async manifest write support.
2026-01-20 19:03:45 +01:00
Aaron Son 6f4940ffa9 Merge remote-tracking branch 'origin/main' into aaron/sql-server-check-for-env-load-error 2026-01-16 16:17:41 -08:00
Aaron Son 14ac7f4b49 Merge remote-tracking branch 'origin/main' into aaron/oldgen-sync-manifest-writes 2026-01-16 16:17:04 -08:00
Aaron Son 00f46cbc0c Merge pull request #10327 from dolthub/aaron/lazy-temp-file-provider
go/cmd/dolt: Make movable temp file configuration lazy.
2026-01-17 01:16:29 +01:00
Aaron Son 0d0176025d Update go/store/util/tempfiles/temp_files.go
Co-authored-by: angelamayxie <angela@dolthub.com>
2026-01-16 15:42:32 -08:00
Aaron Son 5362a4ca25 go/store/utils/tempfiles: PR feedback. Comment for LazyTempFileProvider. 2026-01-16 15:42:10 -08:00
Aaron Son 0138923e6a go/cmd/dolt: Make movable temp file configuration lazy.
Previously, early in the process life-cycle after dolt was run, dolt would immediately check if a file created in `os.TempDir()` was able to be `os.Rename`d into a subdirectory of the dolt process's data directory, by default `$PWD/.dolt`. If the rename failed, it would configure Dolt to use `.dolt/temptf` as the movable temp file directory instead.

This meant that for many `dolt` invocations, Dolt would do some local filesystem writes, including potentially `Mkdir(.dolt)` before it it was fully loaded. With the advent of things like dolt accessing the running server through sql-server.info and `dolt --host ... sql` this behavior was not ideal. It creates races with concurrently run `dolt` processes that try to use the `.dolt` directory, and it creates odd behavior when running something like `dolt sql` in a non-Dolt directory but on a filesystem mount where this rename from `os.TempDir()` does not work.

This PR changes the check and the configuration of a potential `.dolt/temptf` directory to be delayed until the first temporary movable file is actually requested by Dolt. At that point we know that we have a need for a renamable temp file and it is OK to go ahead and create `.dolt/temptf` if we need it.

This PR changes the error handling around some edge cases like permissions errors on the calling process creating `temptf` within `.dolt`. In particular, some errors which were previously early and fatal are now delayed until use site and may end up being persistent but non-fatal to the process, depending on the operation.
2026-01-16 15:13:12 -08:00