Skip to content

go/store/nbs: journal.go: Fix a bug which could result in broken databases after a process crash.#11074

Merged
reltuk merged 2 commits into
mainfrom
aaron/journal-empty-contents-no-reset-root
May 19, 2026
Merged

go/store/nbs: journal.go: Fix a bug which could result in broken databases after a process crash.#11074
reltuk merged 2 commits into
mainfrom
aaron/journal-empty-contents-no-reset-root

Conversation

@reltuk
Copy link
Copy Markdown
Contributor

@reltuk reltuk commented May 19, 2026

If Dolt crashed immediately after creating an empty journal file, and before it wrote the initial set-root record to it, then the next time Dolt ran it would treat the root of the database as 0000....

This could also happen for certain observed filesystem states after an operating system crash.

reltuk added 2 commits May 19, 2026 11:24
…bases after a process crash.

If Dolt crashed immediately after creating an empty journal file, and
before it wrote the initial set-root record to it, then the next time
Dolt ran it would treat the root of the database as `0000...`.

This could also happen for certain observed filesystem states after an
operating system crash.
…t critical persistence failures for a journal bootstrap on the running database storage have the correct behavior.
@coffeegoddd
Copy link
Copy Markdown
Contributor

@reltuk DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 0.55 0.55 0.0
groupby_scan 9.91 9.91 0.0
index_join 1.86 1.86 0.0
index_join_scan 1.34 1.34 0.0
index_scan 20.37 20.37 0.0
oltp_point_select 0.26 0.26 0.0
oltp_read_only 5.18 5.18 0.0
select_random_points 0.52 0.51 -1.92
select_random_ranges 0.57 0.56 -1.75
table_scan 20.74 20.74 0.0
types_table_scan 45.79 45.79 0.0
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.21 6.21 0.0
oltp_insert 3.07 3.02 -1.63
oltp_read_write 10.84 10.84 0.0
oltp_update_index 3.13 3.13 0.0
oltp_update_non_index 2.97 2.97 0.0
oltp_write_only 5.88 5.77 -1.87
types_delete_insert 6.55 6.55 0.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@reltuk DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 45.79 45.79 0.0
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt 55dc2b9 52.6 dolt bed329a 52.81 0.4

@coffeegoddd
Copy link
Copy Markdown
Contributor

@reltuk DOLT

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

@reltuk reltuk merged commit a13d740 into main May 19, 2026
40 of 43 checks passed
@tbantle22 tbantle22 deleted the aaron/journal-empty-contents-no-reset-root branch May 20, 2026 20:50
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.

3 participants