dcapwell commented on code in PR #103:
URL: https://github.com/apache/cassandra-accord/pull/103#discussion_r1777732982


##########
accord-core/src/main/java/accord/coordinate/Exhausted.java:
##########
@@ -32,27 +32,27 @@
 public class Exhausted extends CoordinationFailed
 {
     final Ranges unavailable;
-    private String message;
 
     public Exhausted(TxnId txnId, @Nullable RoutingKey homeKey, Ranges 
unavailable)
     {
-        super(txnId, homeKey);
+        super(txnId, homeKey, getMessage(txnId, unavailable));
         this.unavailable = unavailable;
     }
 
-    public String getMessage()
-    {
-        if (message == null)
-            message = unavailable == null ? "No more nodes to try" : "No more 
nodes to try for: " + unavailable;
-        return message;
-    }
-
     Exhausted(TxnId txnId, @Nullable RoutingKey homeKey, Ranges unavailable, 
Exhausted cause)
     {
         super(txnId, homeKey, cause);
         this.unavailable = unavailable;
     }
 
+    private static String getMessage(TxnId txnId, @Nullable Ranges unavailable)
+    {
+        String msg = "No more nodes to try for " + txnId;

Review Comment:
   this isn't a core change, but when debugging you need to know what txn so 
you can inspect the state.  "something failed" is hard to work with and was 
hard to debug while creating this patch



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