Apache9 commented on code in PR #6534:
URL: https://github.com/apache/hbase/pull/6534#discussion_r1886247516


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/SplitWALProcedure.java:
##########
@@ -51,6 +51,7 @@ public class SplitWALProcedure
   private ServerName worker;
   private ServerName crashedServer;
   private RetryCounter retryCounter;
+  private Integer workerChangeCount = 0;

Review Comment:
   Why Integer not int?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java:
##########
@@ -237,6 +237,8 @@ static void requestLogRoll(final WAL wal) {
   /** File Extension used while splitting an WAL into regions (HBASE-2312) */
   public static final String SPLITTING_EXT = "-splitting";
 
+  public static final String RETRYING_EXT = ".retrying";

Review Comment:
   Better add some comments to explain how we use this.



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitWALManager.java:
##########
@@ -184,4 +185,19 @@ public void releaseSplitWALWorker(ServerName worker, 
MasterProcedureScheduler sc
   public void addUsedSplitWALWorker(ServerName worker) {
     splitWorkerAssigner.addUsedWorker(worker);
   }
+
+  public String renameWALForRetry(String walPath, Integer workerChangeCount) 
throws IOException {
+    String originalWALPath;
+    if (workerChangeCount == 0) {
+      originalWALPath = walPath;
+    } else {
+      originalWALPath = walPath.substring(0, walPath.length() - 
RETRYING_EXT.length() - 3);
+    }
+    String walNewName =

Review Comment:
   So when retrying number is 0, we also have the '.retrying' suffix? Will this 
cause trouble when upgrading?



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

Reply via email to