Skip to content
Discussion options

You must be logged in to vote

Both are logically correct - when you use SyncAll, you make sure the data arrives on disk before continuing, but it will be (much) slower.

By default, the data will "only" be flushed to the OS, so it can be written to disk on application crash, but not on power loss or kernel panic.

You can also shorten it to:

let mut write_tx = keyspace.write_tx().durability(Some(fjall::PersistMode::SyncAll));

let key = "a";
let Some(item) = write_tx.get(&partition, key)? else {
    return Ok(());
};

write_tx.insert(&partition, key, "another value");

write_tx.commit()?;

or use WriteTx::fetch_update.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MarkAntipin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested api
2 participants