Skip to content

Commit

Permalink
fix: more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dranikpg committed Feb 4, 2024
1 parent 7e699f9 commit bc52151
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/server/multi_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,18 @@ TEST_F(MultiTest, MultiSingleHop) {
for (unsigned i = 0; i < 100; i++) {
Run({"multi"});
Run({"rpush", "a", "bar"});
Run({"rpush", "a", "baz"});
Run({"exec"});
}
});

fb0.Join();

// Check list consistency
auto res = Run({"lrange", "a", "0", "-1"});
auto list = res.GetVec();
for (size_t i = 0; i < 200; i++)
EXPECT_EQ(list[i], i % 2 == 0 ? "bar" : "baz");

auto metrics = GetMetrics();

int mode = absl::GetFlag(FLAGS_multi_exec_mode);
Expand Down
2 changes: 1 addition & 1 deletion src/server/transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Transaction::Transaction(const CommandId* cid) : cid_{cid} {
}
}

Transaction::Transaction(const Transaction* parent, ShardId shard_id, std::optional<SlotId> slot_id)
Transaction::Transaction(const Transaction* parent, ShardId shard_id)
: multi_{make_unique<MultiData>()},
txid_{parent->txid()},
unique_shard_cnt_{1},
Expand Down
2 changes: 1 addition & 1 deletion src/server/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class Transaction {
explicit Transaction(const CommandId* cid);

// Initialize transaction for squashing placed on a specific shard with a given parent tx
explicit Transaction(const Transaction* parent, ShardId shard_id, std::optional<SlotId> slot_id);
explicit Transaction(const Transaction* parent, ShardId shard_id);

// Initialize from command (args) on specific db.
OpStatus InitByArgs(DbIndex index, CmdArgList args);
Expand Down

0 comments on commit bc52151

Please sign in to comment.