Skip to content

Abstract SnapshotWorker and durability::Local#4982

Merged
Shubham8287 merged 13 commits into
masterfrom
shub/persistence-abstraction
May 13, 2026
Merged

Abstract SnapshotWorker and durability::Local#4982
Shubham8287 merged 13 commits into
masterfrom
shub/persistence-abstraction

Conversation

@Shubham8287
Copy link
Copy Markdown
Contributor

Description of Changes

  • Introduce SnapshotRepo as the snapshot backend trait and decouple SnapshotWorker from the
    filesystem-backed implementation.

    • Dynamic dispatch-ing is not needed but done to avoid propagating generics all over the place.
    • Snapshotting is also not on the hot path, and durability also follows the same dyn pattern.
  • Make commitlog durability::Local generic over Repo, so the same durability implementation can be
    reused with in-memory and fault-injected repositories.

  • Add a few small API exposure changes under cfg(test) for DST integration.

API and ABI breaking changes

NA.

Expected complexity level and risk

2

Testing

Existing tests should be enough.

@Shubham8287 Shubham8287 force-pushed the shub/persistence-abstraction branch from 8c9bfe0 to 42e55dc Compare May 8, 2026 11:28
@Shubham8287 Shubham8287 requested review from gefjon and kim May 8, 2026 11:29
@Shubham8287 Shubham8287 changed the title Core refactor for DST. Abstract SnapshotWorker and durability::Local May 8, 2026
Comment thread crates/commitlog/src/lib.rs
Comment thread crates/core/src/db/relational_db.rs
Comment thread crates/core/src/db/relational_db.rs
Comment thread crates/core/src/db/relational_db.rs
Comment thread crates/datastore/src/locking_tx_datastore/datastore.rs
Comment thread crates/commitlog/src/repo/mod.rs
@Shubham8287 Shubham8287 requested a review from kim May 11, 2026 08:24
@Shubham8287 Shubham8287 enabled auto-merge May 11, 2026 08:57
Comment thread crates/snapshot/src/lib.rs
Shubham8287 and others added 3 commits May 11, 2026 23:32
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
@Shubham8287 Shubham8287 disabled auto-merge May 12, 2026 17:52
@Shubham8287 Shubham8287 added this pull request to the merge queue May 13, 2026
Merged via the queue into master with commit 81c5dda May 13, 2026
71 of 73 checks passed
@Shubham8287 Shubham8287 deleted the shub/persistence-abstraction branch May 13, 2026 07:50
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