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


##########
src/java/org/apache/cassandra/service/StorageProxy.java:
##########
@@ -1316,13 +1318,17 @@ public static void 
dispatchMutationsWithRetryOnDifferentSystem(List<? extends IM
                 {
                     if (accordResult != null)
                     {
-                        TxnResult.Kind kind = 
accordResult.awaitAndGet().kind();
+                        TxnResult result = accordResult.awaitAndGet();
+                        TxnResult.Kind kind = result.kind();
                         if (kind == retry_new_protocol && failure == null)
                         {
                             Tracing.trace("Accord returned retry new 
protocol");
                             logger.debug("Retrying mutations on different 
system because some mutations were misrouted according to Accord");
                             continue;
                         }
+                        if (result.kind() == validation_rejection)
+                            throw ((TxnValidationRejection) 
result).validationException;
+

Review Comment:
   switched to `TxnValidationRejection.maybeThrow(txnResult);`



-- 
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