mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
fix(transaction): Reset reverse index in multi-tx (#2086)
* fix(transaction): Reset reverse index in multi-tx Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io> --------- Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
parent
84744a4004
commit
39c1827fa7
2 changed files with 13 additions and 2 deletions
|
@ -294,7 +294,7 @@ void Transaction::InitByKeys(KeyIndex key_index) {
|
|||
// Validation. Check reverse mapping was built correctly.
|
||||
if (needs_reverse_mapping) {
|
||||
for (size_t i = 0; i < args_.size(); ++i) {
|
||||
DCHECK_EQ(args_[i], ArgS(args, reverse_index_[i]));
|
||||
DCHECK_EQ(args_[i], ArgS(args, reverse_index_[i])) << args;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -393,7 +393,10 @@ void Transaction::MultiSwitchCmd(const CommandId* cid) {
|
|||
unique_shard_id_ = 0;
|
||||
|
||||
unique_shard_cnt_ = 0;
|
||||
|
||||
args_.clear();
|
||||
reverse_index_.clear();
|
||||
|
||||
cid_ = cid;
|
||||
cb_ptr_ = nullptr;
|
||||
|
||||
|
@ -1414,7 +1417,7 @@ void Transaction::CancelBlocking() {
|
|||
}
|
||||
|
||||
OpResult<KeyIndex> DetermineKeys(const CommandId* cid, CmdArgList args) {
|
||||
if (cid->opt_mask() & CO::GLOBAL_TRANS)
|
||||
if (cid->opt_mask() & (CO::GLOBAL_TRANS | CO::NO_KEY_TRANSACTIONAL))
|
||||
return KeyIndex::Empty();
|
||||
|
||||
KeyIndex key_index;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue