@@ -463,11 +463,12 @@ struct OpSetParams {
463463 bool skip_if_exists = false ;
464464 uint32_t ttl = UINT32_MAX;
465465 bool keepttl = false ;
466+
467+ optional<util::fb2::Future<bool >>* backpressure = nullptr ;
466468};
467469
468470OpResult<CbVariant<uint32_t >> OpSet (const OpArgs& op_args, string_view key, CmdArgList values,
469- const OpSetParams& op_sp = OpSetParams{},
470- optional<util::fb2::Future<bool >>* bp_anker = nullptr ) {
471+ const OpSetParams& op_sp = OpSetParams{}) {
471472 DCHECK (!values.empty () && 0 == values.size () % 2 );
472473 VLOG (2 ) << " OpSet(" << key << " )" ;
473474
@@ -487,7 +488,7 @@ OpResult<CbVariant<uint32_t>> OpSet(const OpArgs& op_args, string_view key, CmdA
487488
488489 using D = tiering::SerializedMapDecoder;
489490 util::fb2::Future<OpResult<uint32_t >> fut;
490- auto read_cb = [fut, values, & op_sp](io::Result<D*> res) mutable {
491+ auto read_cb = [fut, values, op_sp](io::Result<D*> res) mutable {
491492 auto & lw = *res.value ()->Write ();
492493 uint32_t created = 0 ;
493494 for (size_t i = 0 ; i < values.size (); i += 2 ) {
@@ -557,8 +558,8 @@ OpResult<CbVariant<uint32_t>> OpSet(const OpArgs& op_args, string_view key, CmdA
557558
558559 if (auto * ts = op_args.shard ->tiered_storage (); ts) {
559560 auto bp = ts->TryStash (op_args.db_cntx .db_index , key, &pv, true );
560- if (bp && bp_anker )
561- *bp_anker = std::move (*bp);
561+ if (bp && op_sp. backpressure )
562+ *op_sp. backpressure = std::move (*bp);
562563 }
563564
564565 return CbVariant<uint32_t >{created};
@@ -921,10 +922,11 @@ void CmdHSet(CmdArgList args, CommandContext* cmd_cntx) {
921922 }
922923
923924 optional<util::fb2::Future<bool >> tiered_backpressure;
925+ OpSetParams params{.backpressure = &tiered_backpressure};
924926
925927 args.remove_prefix (1 );
926928 auto cb = [&](Transaction* t, EngineShard* shard) {
927- return OpSet (t->GetOpArgs (shard), key, args, OpSetParams{}, &tiered_backpressure );
929+ return OpSet (t->GetOpArgs (shard), key, args, params );
928930 };
929931
930932 auto delayed_result = cmd_cntx->tx ->ScheduleSingleHopT (std::move (cb));
0 commit comments