Skip to content

Commit

Permalink
set flags in McRefillRoute from initial request
Browse files Browse the repository at this point in the history
Summary: We want to propagate the flags from the initial request.

Reviewed By: stuclar

Differential Revision: D65573832

fbshipit-source-id: 57fa6801ad82a3528b09b38f6135a074d7adf289
  • Loading branch information
Lenar Fatikhov authored and facebook-github-bot committed Nov 7, 2024
1 parent 69097ec commit ebb0407
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mcrouter/routes/McRefillRoute.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class McRefillRoute {
if (isHitResult(*refillReply.result_ref())) {
McMetagetRequest metaGet(req.key_ref()->fullKey());
metaGet.setClientIdentifier(req.getClientIdentifier().value_or(""));
metaGet.flags_ref() = getFlagsIfExist(req);
auto metaReply = refill_->route(metaGet);
if (isHitResult(*metaReply.result_ref())) {
folly::fibers::addTask(
Expand Down Expand Up @@ -143,7 +144,7 @@ class McRefillRoute {
const McMetagetReply& metaReply) const {
McLeaseSetRequest sreq(primaryReq.key_ref()->fullKey());
sreq.value_ref() = *refillReply.value_ref();
sreq.flags_ref() = *refillReply.flags_ref();
sreq.flags_ref() = *primaryReq.flags_ref();
sreq.exptime_ref() = *metaReply.exptime_ref();
sreq.leaseToken_ref() = *primaryReply.leaseToken_ref();
sreq.setClientIdentifier(primaryReq.getClientIdentifier().value_or(""));
Expand All @@ -159,7 +160,7 @@ class McRefillRoute {
carbon::GetLikeT<Request> = 0) const {
McSetRequest sreq(primaryReq.key_ref()->fullKey());
sreq.value_ref() = *refillReply.value_ref();
sreq.flags_ref() = *refillReply.flags_ref();
sreq.flags_ref() = getFlagsIfExist(primaryReq);
sreq.exptime_ref() = *metaReply.exptime_ref();
sreq.setClientIdentifier(primaryReq.getClientIdentifier().value_or(""));
return sreq;
Expand Down

0 comments on commit ebb0407

Please sign in to comment.