@@ -462,11 +462,12 @@ struct OpSetParams {
462462 bool skip_if_exists = false ;
463463 uint32_t ttl = UINT32_MAX;
464464 bool keepttl = false ;
465+
466+ optional<util::fb2::Future<bool >>* backpressure = nullptr ;
465467};
466468
467469OpResult<CbVariant<uint32_t >> OpSet (const OpArgs& op_args, string_view key, CmdArgList values,
468- const OpSetParams& op_sp = OpSetParams{},
469- optional<util::fb2::Future<bool >>* bp_anker = nullptr ) {
470+ const OpSetParams& op_sp = OpSetParams{}) {
470471 DCHECK (!values.empty () && 0 == values.size () % 2 );
471472 VLOG (2 ) << " OpSet(" << key << " )" ;
472473
@@ -486,7 +487,7 @@ OpResult<CbVariant<uint32_t>> OpSet(const OpArgs& op_args, string_view key, CmdA
486487
487488 using D = tiering::SerializedMapDecoder;
488489 util::fb2::Future<OpResult<uint32_t >> fut;
489- auto read_cb = [fut, values, & op_sp](io::Result<D*> res) mutable {
490+ auto read_cb = [fut, values, op_sp](io::Result<D*> res) mutable {
490491 auto & lw = *res.value ()->Write ();
491492 uint32_t created = 0 ;
492493 for (size_t i = 0 ; i < values.size (); i += 2 ) {
@@ -556,8 +557,8 @@ OpResult<CbVariant<uint32_t>> OpSet(const OpArgs& op_args, string_view key, CmdA
556557
557558 if (auto * ts = op_args.shard ->tiered_storage (); ts) {
558559 auto bp = ts->TryStash (op_args.db_cntx .db_index , key, &pv, true );
559- if (bp && bp_anker )
560- *bp_anker = std::move (*bp);
560+ if (bp && op_sp. backpressure )
561+ *op_sp. backpressure = std::move (*bp);
561562 }
562563
563564 return CbVariant<uint32_t >{created};
@@ -923,10 +924,11 @@ void HSetFamily::HSet(CmdArgList args, const CommandContext& cmd_cntx) {
923924 }
924925
925926 optional<util::fb2::Future<bool >> tiered_backpressure;
927+ OpSetParams params{.backpressure = &tiered_backpressure};
926928
927929 args.remove_prefix (1 );
928930 auto cb = [&](Transaction* t, EngineShard* shard) {
929- return OpSet (t->GetOpArgs (shard), key, args, OpSetParams{}, &tiered_backpressure );
931+ return OpSet (t->GetOpArgs (shard), key, args, params );
930932 };
931933
932934 auto delayed_result = cmd_cntx.tx ->ScheduleSingleHopT (std::move (cb));
0 commit comments