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

prisma-risk / tsoracle / 26243919946
95%

Build:
DEFAULT BRANCH: main
Ran 21 May 2026 06:03PM UTC
Jobs 1
Files 45
Run time 1min
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

21 May 2026 06:01PM UTC coverage: 95.307% (+0.4%) from 94.897%
26243919946

push

github

web-flow
feat(driver-openraft): persist HighWaterStateMachine snapshots via pluggable SnapshotStore (#36)

* feat(driver-openraft): persist HighWaterStateMachine snapshots via pluggable SnapshotStore

Adds a `SnapshotStore` trait that `HighWaterStateMachine` writes through
to from `build_snapshot` and `install_snapshot`, and rehydrates from on
construction via the new `with_store` constructor. Ships an
`InMemorySnapshotStore` (default, preserving existing `new()` behavior)
and a `RocksdbSnapshotStore` behind a `rocksdb-snapshot-store` feature
(default-on) keyed in a caller-managed CF with `set_sync(true)` writes.

This is what lets openraft re-enable the default
`SnapshotPolicy::LogsSinceLast(N)` against this state machine without
losing data when the log prefix is purged. The `openraft-standalone`
example switches to the default policy and shares one `Arc<DB>` between
log and snapshot. The `openraft-piggyback` example keeps
`SnapshotPolicy::Never` because its custom `HostStateMachine` is still
in-memory; comments and READMEs updated to point at that constraint
rather than at a "driver-crate follow-up."

Adds `tests/snapshot_restart.rs` exercising the snapshot -> purge ->
restart -> replay sequence: bumps a single-node cluster with
`LogsSinceLast(4)` + `max_in_snapshot_log_to_keep = 0` until openraft
fires a snapshot and purges the log, then reopens and asserts the SM
recovers the last value -- impossible without the persisted snapshot.

Closes #25

* test(driver-openraft): cover Debug, Default, decode-error, and CF-drop paths

Closes the 0.06% coverage delta flagged in the prior commit by hitting
the production-code branches the existing tests left untouched:

- `RocksdbSnapshotStore` `Debug` impl, exercised via `format!("{:?}", ...)`.
- `cf_handle` error path, triggered by dropping the CF after `open`
  succeeded — surfaces as an `io::Error` rather than a panic.
- `HighWaterStateMachine::default()`, the canonical no-arg entry point.
- `begin_receiving_snapsh... (continued)

291 of 293 new or added lines in 2 files covered. (99.32%)

4894 of 5135 relevant lines covered (95.31%)

99501.68 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
99.56
1.4% crates/tsoracle-driver-openraft/src/state_machine.rs
Jobs
ID Job ID Ran Files Coverage
1 26243919946.1 21 May 2026 06:03PM UTC 45
95.31
GitHub Action Run
Source Files on build 26243919946
  • Tree
  • List 45
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26243919946
  • 5d82d12b on github
  • Prev Build on main (#26242562641)
  • Next Build on main (#26244601870)
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