Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Dec 20, 2024
1 parent ac2d7d8 commit 775937e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/tx-ssi-partition-move/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ fn main() -> fjall::Result<()> {
// Something like SingleDelete https://github.com/facebook/rocksdb/wiki/Single-Delete
// would be good for this type of workload
if let Some((key, value)) = tx.first_key_value(&src)? {
tx.remove(&src, &key);
tx.insert(&dst, &key, &value);
let task_id = std::str::from_utf8(&key).unwrap().to_owned();

tx.remove(&src, key.clone());
tx.insert(&dst, key, value);

tx.commit()?.ok();

let task_id = std::str::from_utf8(&key).unwrap();
println!("consumer {idx} moved {task_id}");

let ms = rng.gen_range(10..100);
Expand Down

0 comments on commit 775937e

Please sign in to comment.