Files
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
..
2025-08-27 19:19:14 -07:00
2025-08-27 19:19:14 -07:00
2025-11-03 13:49:17 -08:00
2024-08-20 15:49:23 -07:00
2025-08-27 19:19:14 -07:00
2025-08-27 19:19:14 -07:00
2024-08-20 15:49:23 -07:00
2025-11-26 10:25:32 -08:00
2025-07-25 10:32:28 -07:00

dolt/go/store

The persistence layer for dolt. Based on noms, but adapted for storing table data.