Skip to content

Commit 673de8c

Browse files
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 <[email protected]>
1 parent cf9ac35 commit 673de8c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/server/generic_family.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,13 +458,14 @@ OpStatus Renamer::DeserializeDest(Transaction* t, EngineShard* shard) {
458458

459459
if (shard->journal()) {
460460
auto expire_str = absl::StrCat(serialized_value_.expire_ts);
461-
RecordJournal(op_args, "RESTORE"sv,
462-
ArgSlice{dest_key_, expire_str, serialized_value_.value, "REPLACE"sv, "ABSTTL"sv},
463-
2, true);
461+
462+
absl::InlinedVector<std::string_view, 6> args(
463+
{dest_key_, expire_str, serialized_value_.value, "REPLACE"sv, "ABSTTL"sv});
464464
if (serialized_value_.sticky) {
465-
RecordJournal(op_args, "STICK"sv, ArgSlice{dest_key_}, 2, true);
465+
args.push_back("STICK"sv);
466466
}
467-
RecordJournalFinish(op_args, 2);
467+
468+
RecordJournal(op_args, "RESTORE"sv, args, 2);
468469
}
469470

470471
return OpStatus::OK;

0 commit comments

Comments
 (0)