@@ -458,8 +458,7 @@ OpStatus Renamer::DelSrc(Transaction* t, EngineShard* shard) {
458
458
459
459
DVLOG (1 ) << " Rename: removing the key '" << src_key_;
460
460
461
- res.post_updater .Run ();
462
- db_slice.Del (t->GetDbContext (), it);
461
+ db_slice.DelMutable (t->GetDbContext (), std::move (res));
463
462
if (shard->journal ()) {
464
463
RecordJournal (t->GetOpArgs (shard), " DEL" sv, ArgSlice{src_key_}, 2 );
465
464
}
@@ -480,8 +479,7 @@ OpStatus Renamer::DeserializeDest(Transaction* t, EngineShard* shard) {
480
479
481
480
if (dest_found_) {
482
481
DVLOG (1 ) << " Rename: deleting the destiny key '" << dest_key_;
483
- dest_res.post_updater .Run ();
484
- db_slice.Del (op_args.db_cntx , dest_res.it );
482
+ db_slice.DelMutable (op_args.db_cntx , std::move (dest_res));
485
483
}
486
484
487
485
if (restore_args.Expired ()) {
@@ -588,8 +586,7 @@ OpStatus OpRestore(const OpArgs& op_args, std::string_view key, std::string_view
588
586
if (restore_args.Replace ()) {
589
587
VLOG (1 ) << " restore command is running with replace, found old key '" << key
590
588
<< " ' and removing it" ;
591
- res.post_updater .Run ();
592
- db_slice.Del (op_args.db_cntx , res.it );
589
+ db_slice.DelMutable (op_args.db_cntx , std::move (res));
593
590
} else {
594
591
// we are not allowed to replace it.
595
592
return OpStatus::KEY_EXISTS;
@@ -938,14 +935,12 @@ OpResult<void> OpRen(const OpArgs& op_args, string_view from_key, string_view to
938
935
to_res.it ->first .SetSticky (sticky);
939
936
to_res.post_updater .Run ();
940
937
941
- from_res.post_updater .Run ();
942
- db_slice.Del (op_args.db_cntx , from_res.it );
938
+ db_slice.DelMutable (op_args.db_cntx , std::move (from_res));
943
939
} else {
944
940
// Here we first delete from_it because AddNew below could invalidate from_it.
945
941
// On the other hand, AddNew does not rely on the iterators - this is why we keep
946
942
// the value in `from_obj`.
947
- from_res.post_updater .Run ();
948
- db_slice.Del (op_args.db_cntx , from_res.it );
943
+ db_slice.DelMutable (op_args.db_cntx , std::move (from_res));
949
944
auto op_result = db_slice.AddNew (op_args.db_cntx , to_key, std::move (from_obj), exp_ts);
950
945
RETURN_ON_BAD_STATUS (op_result);
951
946
to_res = std::move (*op_result);
0 commit comments