Skip to content

feat(checkpoint): add storage checkpoint API#314

Merged
KKould merged 2 commits intomainfrom
feat/checkpoint-api
Mar 29, 2026
Merged

feat(checkpoint): add storage checkpoint API#314
KKould merged 2 commits intomainfrom
feat/checkpoint-api

Conversation

@KKould
Copy link
Copy Markdown
Member

@KKould KKould commented Mar 29, 2026

What problem does this PR solve?

KiteSQL did not expose a storage-level checkpoint API, which made it harder to take online consistent snapshots from native embeddings.

Issue link:

What is changed and how it works?

  • Add CheckpointableStorage and Database::checkpoint(path) so checkpoint support is exposed as an optional storage capability.
  • Implement checkpoint support for RocksDB-backed storage.
    • build_optimistic() uses RocksDB's safe checkpoint path.
    • build_rocksdb() is gated behind unsafe_txdb_checkpoint because upstream rocksdb does not expose a safe TransactionDB checkpoint API.
  • Add a small build.rs guard so unsafe_txdb_checkpoint only builds with the currently validated rocksdb and librocksdb-sys versions in Cargo.lock.
  • Add coverage for disabled mode, non-empty target directories, restore-from-checkpoint, and checkpoint-under-concurrent-writes.
  • Document checkpoint support in docs/features.md, keep the README summary short, and bump kite_sql to 0.2.1.

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 used for this branch:

  • cargo test checkpoint -- --nocapture
  • cargo test --features unsafe_txdb_checkpoint checkpoint -- --nocapture

@KKould KKould self-assigned this Mar 29, 2026
@KKould KKould added the enhancement New feature or request label Mar 29, 2026
@KKould KKould merged commit 3b55271 into main Mar 29, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant