diff --git a/fdbserver/CommitProxyServer.actor.cpp b/fdbserver/CommitProxyServer.actor.cpp index 13f3729ef0..04184c430a 100644 --- a/fdbserver/CommitProxyServer.actor.cpp +++ b/fdbserver/CommitProxyServer.actor.cpp @@ -1955,6 +1955,8 @@ struct TransactionStateResolveContext { // Pointer to transaction state store, shortcut for commitData.txnStateStore IKeyValueStore* pTxnStateStore = nullptr; + Future txnRecovery; + // Actor streams PromiseStream>* pActors = nullptr; @@ -2070,6 +2072,9 @@ ACTOR Future processTransactionStateRequestPart(TransactionStateResolveCon ASSERT(pContext->pActors != nullptr); if (pContext->receivedSequences.count(request.sequence)) { + if (pContext->receivedSequences.size() == pContext->maxSequence) { + wait(pContext->txnRecovery); + } // This part is already received. Still we will re-broadcast it to other CommitProxies pContext->pActors->send(broadcastTxnRequest(request, SERVER_KNOBS->TXN_STATE_SEND_AMOUNT, true)); wait(yield()); @@ -2095,7 +2100,8 @@ ACTOR Future processTransactionStateRequestPart(TransactionStateResolveCon if (pContext->receivedSequences.size() == pContext->maxSequence) { // Received all components of the txnStateRequest ASSERT(!pContext->processed); - wait(processCompleteTransactionStateRequest(pContext)); + pContext->txnRecovery = processCompleteTransactionStateRequest(pContext); + wait(pContext->txnRecovery); pContext->processed = true; }