• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

joaoh82 / rust_sqlite / 25652227157 / 1
69%
main: 69%

Build:
DEFAULT BRANCH: main
Ran 11 May 2026 05:37AM UTC
Files 60
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 May 2026 05:32AM UTC coverage: 68.331% (+0.3%) from 68.001%
25652227157.1

push

github

web-flow
feat(engine): Phase 11.6 MVCC garbage collection (SQLR-22) (#127)

Bounds in-memory MvStore growth. Without GC, every committed
version stays forever in the in-memory chain — a memory leak
that grows linearly with commits. Per-commit sweep + an
explicit Connection::vacuum_mvcc() for full-store drains
together cover the v0 model.

Promoted ahead of plan-doc 11.5 (checkpoint integration)
because durability already works through the legacy
save_database mirror (11.4). The unbounded-MvStore-growth gap
was the next concrete user-impact concern after 11.5 closed
the snapshot-read hole. Plan-doc 11.5 (checkpoint) → roadmap
11.7; plan-doc 11.6 (GC) → roadmap 11.6 (this slice).

New on MvStore:
- active_watermark() — returns min_active_begin_ts.unwrap_or
  (u64::MAX). Versions whose end is > watermark must be kept;
  ≤ watermark are reclaimable.
- gc_chain(row_id, watermark) — sweeps one row's chain,
  reclaims superseded versions, drops the row from the outer
  map if its chain becomes empty.
- gc_all(watermark) — full-store sweep. Snapshots row keys
  upfront so the outer map lock isn't held across per-chain
  locks.

Connection::commit_concurrent gains a per-commit GC sweep on
the write-set's chains. Crucially drops the TxHandle FIRST so
its begin_ts exits the active-tx registry — otherwise the
watermark would stay pinned to our own begin_ts and we'd
preserve every version we just wrote. With the handle dropped,
the watermark advances naturally and the sweep can reclaim
aggressively.

New Connection::vacuum_mvcc() public method runs a full-store
sweep at the current watermark. Returns the count reclaimed.
Safe to call regardless of journal_mode (no-op on Wal-mode
databases). The "vacuum the whole store" escape hatch for
memory-pressure workloads or tests that want a deterministic
baseline.

Tests (11 new):
- 7 in mvcc::store::tests:
  - active_watermark_is_max_with_no_readers
  - active_watermark_tracks_oldest_in_flight_tx
  - gc_chain_reclaims_versions_bel... (continued)

10577 of 15479 relevant lines covered (68.33%)

1.24 hits per line

Source Files on job 25652227157.1
  • Tree
  • List 60
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25652227157
  • 4b64d13d on github
  • Prev Job for on main (#25638930315.1)
  • Next Job for on main (#25655045701.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc