fix(dursto): open databases read-only when checking out#1089
Merged
Conversation
|
Benchmark results for revision 50c4db4:
Full results
Compare the results above with those for the default branch. |
emturner
approved these changes
Jun 9, 2026
emturner
left a comment
Contributor
There was a problem hiding this comment.
I came across this yesterday too! But this time in the context of the file-handles investigation.
The diff is identical to the one I hadn't pushed yet 😅 so LGTM
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1089 +/- ##
==========================================
+ Coverage 90.16% 90.19% +0.02%
==========================================
Files 130 130
Lines 28391 28394 +3
Branches 28391 28394 +3
==========================================
+ Hits 25599 25609 +10
+ Misses 2027 2020 -7
Partials 765 765 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kurtisc
approved these changes
Jun 9, 2026
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.
Relates to RV-984
What
Opens RocksDB databases as read-only when checking out.
Why
Stumbled upon this while trying to diagnose an issue with the long tests (#1084) where I noticed that the size of a commit is (surprisingly) correlated to the the number of proptest cases executed. This happens because every test case starts with a checkout, which, in read-write mode, will result in a new
LOGfile, with the previous log file stored asLOG.old.XXXX. This balloons the size of a commit from ~1.5 MiB for 10 test cases to ~22 MiB for 256 test cases. With this fix, the initial commit drops to 0.24 MiB.How
By using
open_cf_descriptors_read_onlyinstead ofopen_cf_descriptorsfor checking out.An alternative fix would have been to limit the number of log files that are kept using
set_keep_log_file_num. We could fall back on it if there's a good reason to keep opening DBs in read-write mode.Manually Testing
Tasks for the Author