szetszwo commented on code in PR #10313:
URL: https://github.com/apache/ozone/pull/10313#discussion_r3283450326


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SequenceIdGenerator.java:
##########
@@ -259,18 +254,18 @@ public Boolean allocateBatch(String sequenceIdName,
 
       try {
         transactionBuffer
-            .addToBuffer(sequenceIdTable, sequenceIdName, newLastId);
+            .addToBuffer(sequenceIdTable, idType.name(), newLastId);
       } catch (IOException ioe) {
         throw new RuntimeException("Failed to put lastId to Batch", ioe);
       }
 
-      sequenceIdToLastIdMap.put(sequenceIdName, newLastId);
+      sequenceIdToLastIdMap.put(idType, newLastId);
       return true;
     }
 
     @Override
     public Long getLastId(String sequenceIdName) {

Review Comment:
   Since getLastId is a local method, we can change it to use SequenceIdType.
   



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