feat: Remove batch locks from non-atomic squashing (#1613)

feat: Remove batch locks from non-atomic squashing

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
Vladislav 2023-08-02 09:16:47 +03:00 committed by GitHub
parent 3b0bd212f4
commit 844fe57dec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 38 deletions

View file

@ -332,14 +332,6 @@ OpStatus Transaction::InitByArgs(DbIndex index, CmdArgList args) {
return OpStatus::OK;
}
void Transaction::PrepareSquashedMultiHop(const CommandId* cid, CmdArgList keys) {
MultiSwitchCmd(cid);
multi_->role = SQUASHER;
InitBase(db_index_, keys);
InitByKeys(KeyIndex::Range(0, keys.size()));
}
void Transaction::PrepareSquashedMultiHop(const CommandId* cid,
absl::FunctionRef<bool(ShardId)> enabled) {
CHECK(multi_->mode == GLOBAL || multi_->mode == LOCK_AHEAD);