Zooooey commented on code in PR #4449:
URL: https://github.com/apache/hbase/pull/4449#discussion_r887969046


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java:
##########
@@ -630,12 +630,8 @@ public Path getCurrentFileName() {
    * retrieve the next path to use for writing. Increments the internal 
filenum.
    */
   private Path getNewPath() throws IOException {
-    this.filenum.set(EnvironmentEdgeManager.currentTime());
+    this.filenum.set(Math.max(getFilenum() + 1, 
EnvironmentEdgeManager.currentTime()));
     Path newPath = getCurrentFileName();
-    while (fs.exists(newPath)) {

Review Comment:
   Why remove this while loop? I guess this while loop can make the code more 
robust.



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