fjall-rs / fjall

🗻 LSM-based embeddable key-value storage engine written in safe Rust
https://fjall-rs.github.io/
Apache License 2.0
574 stars 24 forks source link

Optimistic concurrency control through sequence number #39

Closed AbstractiveNord closed 8 months ago

AbstractiveNord commented 8 months ago

Is your feature request related to a problem? Please describe. Currently it's not possible to ensure you work with latest key version.

Describe the solution you'd like Make possible to keys have sequence number, which may be used for denying modifying operations, if last sequence of stream and requested number doesn't match.

marvin-j97 commented 8 months ago

Currently it's not possible to ensure you work with latest key version.

This is true, reads & writes are not happening under some transactional context. My goal is to have an opt-in way to get transaction support, like in RocksDB. See https://github.com/fjall-rs/fjall/issues/30.

Make possible to keys have sequence number

All key-value pairs already have a sequence number associated with them, that's how snapshot support works (https://docs.rs/fjall/latest/fjall/struct.PartitionHandle.html#method.snapshot).

marvin-j97 commented 1 month ago

Optimistic concurrency control (w/ serializable snapshot isolation) will be implemented by https://github.com/fjall-rs/fjall/pull/79

marvin-j97 commented 2 weeks ago

Implemented in https://github.com/fjall-rs/fjall/pull/79