Skip to content

test(dursto): add snapshots pruning option for long tests#1090

Merged
victor-dumitrescu merged 1 commit into
mainfrom
vdum/rv-1008
Jun 17, 2026
Merged

test(dursto): add snapshots pruning option for long tests#1090
victor-dumitrescu merged 1 commit into
mainfrom
vdum/rv-1008

Conversation

@victor-dumitrescu

@victor-dumitrescu victor-dumitrescu commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Closes RV-1008.

What

Adds the --keep-epochs N option for the long tests which, upon finishing a test epoch:

  • deletes every commit except the N most recent ones from the on-disk repo (for the Database<PersistenceLayer, Normal> and TracedDatabase<PersistenceLayer, Normal>)
  • removes every in-memory snapshot except the N most recent ones from the in-memory repo (for the TracedDatabase<InMemoryKeyValueStore, Normal>)

Next:

Why

Older data is not required for failure replay. This significantly reduces the rate at which the long test uses disk and memory. Another benefit is that it confers a degree of confidence that a future disk GC solution implementing similar behaviour does not cause unexpected failures.

Manually Testing

Run

cargo run --release --features rocksdb,unstable-test-utils --bin database_long_test -- test --epochs 10 --ops-per-epoch 100 --cases-per-epoch 20 --keep-epochs 5

and compare the size of the repo shown at the end of the test with a re-run of the same test (using the seed printed by the previous run) without passing --keep-epochs:

cargo run --release --features rocksdb,unstable-test-utils --bin database_long_test -- test --epochs 10 --ops-per-epoch 100 --cases-per-epoch 20 --seed XXXX

Tasks for the Author

  • Link all Linear issues related to this MR using magic words (e.g. part of, relates to, closes).
  • Eliminate dead code and other spurious artefacts introduced in your changes.
  • Document new public functions, methods and types.
  • Make sure the documentation for updated functions, methods, and types is correct.
  • Add tests for bugs that have been fixed.
  • Explain changes to regression test captures when applicable.
  • Write commit messages in agreement with our guidelines.
  • Self-review your changes to ensure they are high-quality.
  • Complete all of the above before assigning this MR to reviewers.

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.63636% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.92%. Comparing base (8b8098f) to head (2b539a3).

Files with missing lines Patch % Lines
durable-storage/src/long_test/mod.rs 62.50% 6 Missing and 3 partials ⚠️
durable-storage/src/bin/database_long_test.rs 0.00% 2 Missing ⚠️
durable-storage/src/storage/in_memory.rs 85.71% 0 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (63.63%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1090      +/-   ##
==========================================
- Coverage   89.96%   89.92%   -0.04%     
==========================================
  Files         135      135              
  Lines       29217    29240      +23     
  Branches    29217    29240      +23     
==========================================
+ Hits        26284    26294      +10     
- Misses       2110     2125      +15     
+ Partials      823      821       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@victor-dumitrescu victor-dumitrescu force-pushed the vdum/rv-1008 branch 2 times, most recently from 8d25302 to f3a9a35 Compare June 12, 2026 08:28
@victor-dumitrescu victor-dumitrescu force-pushed the vdum/rv-984-2 branch 2 times, most recently from ac69241 to 5f9ec95 Compare June 12, 2026 09:36
@victor-dumitrescu victor-dumitrescu force-pushed the vdum/rv-1008 branch 2 times, most recently from 28e414c to 7833ab5 Compare June 12, 2026 13:07
@victor-dumitrescu victor-dumitrescu force-pushed the vdum/rv-984-2 branch 2 times, most recently from 614ef91 to 7325f47 Compare June 15, 2026 08:55
@victor-dumitrescu victor-dumitrescu force-pushed the vdum/rv-1008 branch 2 times, most recently from 7833ab5 to 5368c09 Compare June 15, 2026 08:55
Base automatically changed from vdum/rv-984-2 to main June 15, 2026 16:59
@github-actions

Copy link
Copy Markdown

Benchmark results for revision d79689f:

Metric Duration TPS
Mean 1.472130781s 27.172
Worst 1.483211511s 26.969
Best 1.46651951s 27.275
Standard Deviation ±4.67048ms ±0.086
Full results
Run Transfers Duration TPS
1 40 1.480195335s 27.023
2 40 1.480106764s 27.025
3 40 1.474379949s 27.130
4 40 1.483211511s 26.969
5 40 1.469029942s 27.229
6 40 1.471933553s 27.175
7 40 1.473533172s 27.146
8 40 1.469451523s 27.221
9 40 1.471205507s 27.189
10 40 1.468236775s 27.244
11 40 1.474901218s 27.120
12 40 1.46672387s 27.272
13 40 1.46651951s 27.275
14 40 1.466624537s 27.274
15 40 1.470174617s 27.208
16 40 1.468986851s 27.230
17 40 1.469320367s 27.223
18 40 1.475551757s 27.109
19 40 1.473654597s 27.143
20 40 1.468874256s 27.232

Compare the results above with those for the default branch.

@victor-dumitrescu victor-dumitrescu added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit 41c3e1e Jun 17, 2026
10 of 11 checks passed
@victor-dumitrescu victor-dumitrescu deleted the vdum/rv-1008 branch June 17, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants