@@ -963,8 +963,8 @@ void TQueueLeader::OnLoadStdMessageResult(const TString& requestId, const ui64 o
963963
964964 --reqInfo.LoadAnswersLeft ;
965965 if (success) {
966- bool deleted = true ;
967- bool deadlineChanged = true ;
966+ bool deleted = false ;
967+ bool deadlineChanged = false ;
968968 const bool exists = (*messageRecord)[" Exists" ];
969969 const auto wasDeadLetterValue = (*messageRecord)[" IsDeadLetter" ];
970970 const bool wasDeadLetter = wasDeadLetterValue.HaveValue () ? bool (wasDeadLetterValue) : false ;
@@ -1019,7 +1019,9 @@ void TQueueLeader::OnLoadStdMessageResult(const TString& requestId, const ui64 o
10191019 RLOG_SQS_REQ_WARN (requestId, " Attempted to receive message that was deleted. Shard: " << reqInfo.GetCurrentShard () << " . Offset: " << offset);
10201020 deleted = true ;
10211021 }
1022- } // else there was concurrent delete (purge) by this leader, => OK
1022+ } else { // else there was concurrent delete (purge) by this leader, => OK
1023+ deleted = true ;
1024+ }
10231025 }
10241026 const bool invalidated = deleted || deadlineChanged;
10251027 if (invalidated) {
@@ -1028,7 +1030,7 @@ void TQueueLeader::OnLoadStdMessageResult(const TString& requestId, const ui64 o
10281030 const TString& reason = deleted ? INFLY_INVALIDATION_REASON_DELETED : INFLY_INVALIDATION_REASON_DEADLINE_CHANGED;
10291031 MarkInflyReloading (reqInfo.GetCurrentShard (), 1 , reason);
10301032 }
1031- } else {
1033+ } else { // if (success)
10321034 reqInfo.LoadError = !ignoreMessageLoadingErrors;
10331035 // there may be other successful loads
10341036 }
0 commit comments