You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/07/26 11:31:45 UTC

[GitHub] [accumulo] milleruntime commented on a diff in pull request #2826: Create new method in FastFormat for FATE

milleruntime commented on code in PR #2826:
URL: https://github.com/apache/accumulo/pull/2826#discussion_r929852006


##########
core/src/main/java/org/apache/accumulo/fate/FateTxId.java:
##########
@@ -54,7 +56,9 @@ public static long fromString(String fmtTid) {
    */
   public static String formatTid(long tid) {
     // do not change how this formats without considering implications for persistence
-    return String.format("%s%016x%s", PREFIX, tid, SUFFIX);
+    // original format: String.format("%s%016x%s", PREFIX, tid, SUFFIX);
+    // Since 2.1, this format was replaced with the faster version below
+    return FastFormat.toHexString(PREFIX, tid, SUFFIX);

Review Comment:
   > I'm not sure this comment about the original vs. the replacement implementation is very helpful, and it might be misleading.
   
   My goal was to keep the same format just improve performance.  Assuming I didn't screw it up, then I think you are right that the comment could be misleading.



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org