Skip to content

Add tpcc sync switch and reuse LMDB point-lookup cursor - #391

Merged
KKould merged 2 commits into
mainfrom
perf/tpcc-sync-lmdb-cursor
Oct 25, 2026
Merged

KKould merged 2 commits into
mainfrom
perf/tpcc-sync-lmdb-cursor

Conversation

@KKould

@KKould KKould commented Oct 25, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

TPCC could not compare KiteSQL and SQLite under the same durability setting, and primary-key point lookups opened a new LMDB cursor per key.

Issue link:

What is changed and how it works?

  • Add DataBaseBuilder::sync (RocksDB sync writes / LMDB NO_SYNC) and a tpcc --sync flag shared by all backends, replacing the SQLite-only --sqlite-profile.
  • Remove the tpcc-sqlite-practical/tpcc-sqlite-balanced make targets accordingly.
  • Reuse one storage cursor across primary-key point lookups in an index scan (Transaction::point_cursor/get_at).

Code changes

  • Has Rust code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

  • Validation: make test passes (517 tests) and all SLT files pass; the lookup path is covered by existing index-scan tests.
  • tpcc --sqlite-profile is removed; use --sync instead (default off).

@codecov

codecov Bot commented Oct 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.49206% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.64%. Comparing base (c78efe9) to head (49eaa7f).

Files with missing lines Patch % Lines
src/db.rs 0.00% 11 Missing ⚠️
src/storage/rocksdb.rs 50.00% 10 Missing ⚠️
src/storage/lmdb.rs 92.30% 1 Missing ⚠️
src/storage/mod.rs 93.75% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
- Coverage   93.68%   93.64%   -0.05%     
==========================================
  Files         260      260              
  Lines       48783    48844      +61     
==========================================
+ Hits        45704    45741      +37     
- Misses       3079     3103      +24     
Flag Coverage Δ
rust 93.64% <63.49%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/storage/memory.rs 96.44% <100.00%> (+0.04%) ⬆️
src/storage/lmdb.rs 93.83% <92.30%> (-0.08%) ⬇️
src/storage/mod.rs 93.27% <93.75%> (+<0.01%) ⬆️
src/storage/rocksdb.rs 82.52% <50.00%> (-0.84%) ⬇️
src/db.rs 92.72% <0.00%> (-0.70%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KKould
KKould merged commit 841ebd7 into main Oct 25, 2026
11 checks passed
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.

1 participant