diff options
author | Alex <alex@adnab.me> | 2024-09-14 15:57:27 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2024-09-14 15:57:27 +0000 |
commit | 6da135354135d8d8a5d2476bfbcd4aab91abfc3c (patch) | |
tree | 5028687340c272ba522de8084167034e8f2eaad0 /src/db/test.rs | |
parent | 586957b4b7261b43e7820d7193516153201b4954 (diff) | |
parent | bd71728874e7f03c547246cb0076804f62db102f (diff) | |
download | garage-6da135354135d8d8a5d2476bfbcd4aab91abfc3c.tar.gz garage-6da135354135d8d8a5d2476bfbcd4aab91abfc3c.zip |
Merge pull request 'Don't fetch old values in cross-partition transactional inserts' (#877) from withings/garage:perf/kv/insert-no-return-cross-partition into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/877
Diffstat (limited to 'src/db/test.rs')
-rw-r--r-- | src/db/test.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/test.rs b/src/db/test.rs index e3b7badf..26b816b8 100644 --- a/src/db/test.rs +++ b/src/db/test.rs @@ -21,7 +21,7 @@ fn test_suite(db: Db) { let res = db.transaction::<_, (), _>(|tx| { assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), va); - assert_eq!(tx.insert(&tree, ka, vb).unwrap().unwrap(), va); + assert_eq!(tx.insert(&tree, ka, vb).unwrap(), ()); assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), vb); @@ -33,7 +33,7 @@ fn test_suite(db: Db) { let res = db.transaction::<(), _, _>(|tx| { assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), vb); - assert_eq!(tx.insert(&tree, ka, vc).unwrap().unwrap(), vb); + assert_eq!(tx.insert(&tree, ka, vc).unwrap(), ()); assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), vc); |