mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-12 19:05:47 +02:00
chore: transaction simplification (#2347)
chore: simplify transaction multi-locking Also, add the ananlysis routine that determines whether the schewduled transaction is contended with other transaction in a shard thread. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
ddbdf63470
commit
1fb0a486ac
6 changed files with 87 additions and 131 deletions
|
@ -904,7 +904,8 @@ TEST_F(MultiTest, TestLockedKeys) {
|
|||
EXPECT_EQ(Run({"multi"}), "OK");
|
||||
EXPECT_EQ(Run({"set", "key1", "val1"}), "QUEUED");
|
||||
EXPECT_EQ(Run({"set", "key2", "val2"}), "QUEUED");
|
||||
EXPECT_THAT(Run({"exec"}), RespArray(ElementsAre("OK", "OK")));
|
||||
EXPECT_EQ(Run({"mset", "key1", "val3", "key1", "val4"}), "QUEUED");
|
||||
EXPECT_THAT(Run({"exec"}), RespArray(ElementsAre("OK", "OK", "OK")));
|
||||
fb.Join();
|
||||
EXPECT_FALSE(service_->IsLocked(0, "key1"));
|
||||
EXPECT_FALSE(service_->IsLocked(0, "key2"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue