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


##########
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:
   This can reduce the pressure on namenode, and in general this should not 
happen if we can make sure that the filenum is increased.



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