mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
feat(generic_family): Assemble RESTORE and STICK commands into one commmand during replication of the RENAME command (#3209)
feat(generic_family): Assemble RESTORE and STICK commands into one commmand during RENAME replication Signed-off-by: Stepan Bagritsevich <bagr.stepan@gmail.com>
This commit is contained in:
parent
cf9ac35596
commit
673de8cff3
1 changed files with 6 additions and 5 deletions
|
@ -458,13 +458,14 @@ OpStatus Renamer::DeserializeDest(Transaction* t, EngineShard* shard) {
|
|||
|
||||
if (shard->journal()) {
|
||||
auto expire_str = absl::StrCat(serialized_value_.expire_ts);
|
||||
RecordJournal(op_args, "RESTORE"sv,
|
||||
ArgSlice{dest_key_, expire_str, serialized_value_.value, "REPLACE"sv, "ABSTTL"sv},
|
||||
2, true);
|
||||
|
||||
absl::InlinedVector<std::string_view, 6> args(
|
||||
{dest_key_, expire_str, serialized_value_.value, "REPLACE"sv, "ABSTTL"sv});
|
||||
if (serialized_value_.sticky) {
|
||||
RecordJournal(op_args, "STICK"sv, ArgSlice{dest_key_}, 2, true);
|
||||
args.push_back("STICK"sv);
|
||||
}
|
||||
RecordJournalFinish(op_args, 2);
|
||||
|
||||
RecordJournal(op_args, "RESTORE"sv, args, 2);
|
||||
}
|
||||
|
||||
return OpStatus::OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue