chore: another preparation commit to get rid of kv_args in transaction (#2996)

This changes Entry::Payload to struct instead of variant.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-05-02 09:59:45 +03:00 committed by GitHub
parent 653086c910
commit 9bda5b1d4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 136 additions and 113 deletions

View file

@ -1422,9 +1422,9 @@ void Transaction::LogAutoJournalOnShard(EngineShard* shard, RunnableResult resul
string_view cmd{cid_->name()};
if (unique_shard_cnt_ == 1 || kv_args_.empty()) {
entry_payload = make_pair(cmd, full_args_);
entry_payload = journal::Entry::Payload(cmd, full_args_);
} else {
entry_payload = make_pair(cmd, GetShardArgs(shard->shard_id()).AsSlice());
entry_payload = journal::Entry::Payload(cmd, GetShardArgs(shard->shard_id()).AsSlice());
}
LogJournalOnShard(shard, std::move(entry_payload), unique_shard_cnt_, false, true);
}