Yiran-wu commented on code in PR #6856:
URL: https://github.com/apache/hbase/pull/6856#discussion_r2026331357


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java:
##########
@@ -463,6 +509,12 @@ public static Path findArchivedLog(Path path, 
Configuration conf) throws IOExcep
     }
 
     ServerName serverName = getServerNameFromWALDirectoryName(path);
+    if (serverName == null) {

Review Comment:
   In the original implementation of this function, the serverName was passed 
in directly from the outside and could easily locate the separated oldWALs 
directory. In the current version of the implementation, we can parse the 
serverName by the directory name or file name.
   
   There are currently two types of incoming paths
   1)For Wals
       /hbase/WALs/server-name/some...wals
       /hbase/WALs/server-name-splitting/some...wals
   2) For oldWALs
     
/hbase/oldWALs/regionserver-130%2C16020%2C1742659271913.regionserver-130%2C16020%2C1742659271913.regiongroup-0.1742659287672
  
   
   In the oldWALs path, we can resolve serverName by file name .
   
   
   And of course we can also talk about whether it's necessary to fix it the 
way the serverName was passed in.



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