gluesql_shared_sled_storage

Crates.iogluesql_shared_sled_storage
lib.rsgluesql_shared_sled_storage
version0.2.0
sourcesrc
created_at2024-03-06 20:07:12.552475
updated_at2024-05-13 17:42:51.55129
descriptionGlueSQL shared sled storage, for concurrency and stability
homepage
repositoryhttps://github.com/kanekoshoyu/gluesql_shared_sled_storage
max_upload_size
id1165169
size21,632
Sho Kaneko (kanekoshoyu)

documentation

README

GlueSQL Shared Sled Storage

The stock SledStorage does not do concurrency. I added RwLock and transaction state on top of SledStorage to make it as easy to use as the stock SharedMemoryStorage.

  • RwLock: maintain each valid transaction, by preventing a new transaction while Sled is locked
  • TransactionState: prevent rollback, by avoiding/awaiting new transaction while another transaction that has begin but yet to commit
  • Drop: prevent rollback on next instance, by commiting transaction upon drop as graceful termination

Set await_active_transaction as true to await for the active transaction to commit. Set false to just return error when there is active transaction.

Commit count: 37

cargo fmt