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


##########
accord-core/src/main/java/accord/primitives/TxnId.java:
##########
@@ -181,7 +181,7 @@ public static TxnId minForEpoch(long epoch)
         return new TxnId(epochMsb(epoch), 0, Id.NONE);
     }
 
-    private static final Pattern PARSE = 
Pattern.compile("\\[(?<epoch>[0-9]+),(?<hlc>[0-9]+),(?<flags>[0-9]+)\\([KR][REWSXL]\\),(?<node>[0-9]+)]");
+    private static final Pattern PARSE = 
Pattern.compile("\\[(?<epoch>[0-9]+),(?<hlc>[0-9]+),(?<flags>[0-9]+)\\([KR][REWSXL]\\),(?<node>-?[0-9]+)]");

Review Comment:
   Accord doesn’t, so we shouldn’t support that gee without a lot of wider work 
to make sure it is safe.
   
   in fact epochs alone should immediately break as we truncate to only 48 bits.



##########
accord-core/src/main/java/accord/primitives/TxnId.java:
##########
@@ -181,7 +181,7 @@ public static TxnId minForEpoch(long epoch)
         return new TxnId(epochMsb(epoch), 0, Id.NONE);
     }
 
-    private static final Pattern PARSE = 
Pattern.compile("\\[(?<epoch>[0-9]+),(?<hlc>[0-9]+),(?<flags>[0-9]+)\\([KR][REWSXL]\\),(?<node>[0-9]+)]");
+    private static final Pattern PARSE = 
Pattern.compile("\\[(?<epoch>[0-9]+),(?<hlc>[0-9]+),(?<flags>[0-9]+)\\([KR][REWSXL]\\),(?<node>-?[0-9]+)]");

Review Comment:
   Accord doesn’t, so we shouldn’t support that here without a lot of wider 
work to make sure it is safe.
   
   in fact epochs alone should immediately break as we truncate to only 48 bits.



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