fix(server): handle running script load inside multi (#4074)

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2024-11-10 09:34:40 +02:00 committed by GitHub
parent 75c961e7ed
commit 2d49a28c15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 123 additions and 78 deletions

View file

@ -399,10 +399,12 @@ OpStatus Transaction::InitByArgs(Namespace* ns, DbIndex index, CmdArgList args)
}
if ((cid_->opt_mask() & CO::NO_KEY_TRANSACTIONAL) > 0) {
if ((cid_->opt_mask() & CO::NO_KEY_TX_SPAN_ALL) > 0)
if (((cid_->opt_mask() & CO::NO_KEY_TX_SPAN_ALL) > 0)) {
EnableAllShards();
else
} else {
EnableShard(0);
}
return OpStatus::OK;
}
@ -976,7 +978,7 @@ string Transaction::DEBUG_PrintFailState(ShardId sid) const {
void Transaction::EnableShard(ShardId sid) {
unique_shard_cnt_ = 1;
unique_shard_id_ = sid;
shard_data_.resize(1);
shard_data_.resize(IsActiveMulti() ? shard_set->size() : 1);
shard_data_.front().local_mask |= ACTIVE;
}