Closed sitano closed 3 weeks ago
Hi @sitano. Good point - the shared nature of the current RedisPool
interface prevents this kind of use case from working correctly.
9.1.0 (https://github.com/aembke/fred.rs/pull/248) adds an ExclusivePool
interface that should work here. I added a test that shows how this might work: https://github.com/aembke/fred.rs/blob/feat/9.1.0/tests/integration/pool/mod.rs#L76-L110
This should be working via the new pool interface in https://github.com/aembke/fred.rs/releases/tag/v9.1.0, but let me know if you still have any issues.
Fred version - 9.0.3 Redis version - 6.2.13 Platform - linux+mac (docker on macos) Deployment type - cluster (3 nodes)
Describe the bug
Transactions (https://redis.io/docs/latest/develop/interact/transactions/#watch-explained) do not work correctly:
.watch_before()
is meaningless. if you do not do anything in between WATCH + MULTI what sense does it make?To Reproduce Steps to reproduce the behavior:
imagine there are 2 concurrent threads running client1 and client2. run test.rs.txt multiple times:
Logs (If possible set
RUST_LOG=fred=trace
and run with--features debug-ids
)possible outcomes - UNWATCH fire random node, TX execute on written value:
or UNWATCH missed the node