dcapwell commented on code in PR #2844:
URL: https://github.com/apache/cassandra/pull/2844#discussion_r1372136297


##########
src/java/org/apache/cassandra/repair/consistent/CoordinatorSession.java:
##########
@@ -218,19 +227,29 @@ public synchronized Future<Void> finalizePropose()
     {
         Preconditions.checkArgument(allStates(State.REPAIRING));
         logger.info("Proposing finalization of repair session {}", sessionID);
-        Message<RepairMessage> message = 
Message.out(Verb.FINALIZE_PROPOSE_MSG, new FinalizePropose(sessionID));
+        FinalizePropose request = new FinalizePropose(sessionID);
         for (final InetAddressAndPort participant : participants)
         {
-            sendMessage(participant, message);
+            sendMessageWithRetries(ctx, notDone(finalizeProposeFuture), 
request, Verb.FINALIZE_PROPOSE_MSG, participant);
         }
         return finalizeProposeFuture;
     }
 
-    public synchronized void handleFinalizePromise(InetAddressAndPort 
participant, boolean success)
+    public synchronized void handleFinalizePromise(Message<FinalizePromise> 
message)
     {
+        InetAddressAndPort participant = message.payload.participant;
+        boolean success = message.payload.promised;
         if (getState() == State.FAILED)
         {
             logger.trace("Incremental repair {} has failed, ignoring finalize 
promise from {}", sessionID, participant);
+            sendFailureResponse(ctx, message);
+            return;
+        }
+        sendAck(ctx, message);
+        if (getParticipantState(participant) != State.REPAIRING)

Review Comment:
   this also fixes a IR bug where we see the response *after* we get a fail 
session request...  in that case we fail and log a stack trace saying we can't 
go from `FAILURE -> FINALIZE_PROMISED`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to