wenbingshen commented on code in PR #3762:
URL: https://github.com/apache/bookkeeper/pull/3762#discussion_r1095455325


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileSystemUpgrade.java:
##########
@@ -99,7 +100,13 @@ public boolean accept(File dir, String name) {
     private static List<File> getAllDirectories(ServerConfiguration conf) {
         List<File> dirs = new ArrayList<>();
         dirs.addAll(Lists.newArrayList(conf.getJournalDirs()));
-        Collections.addAll(dirs, conf.getLedgerDirs());
+        final File[] ledgerDirs = conf.getLedgerDirs();
+        final File[] indexDirs = conf.getIndexDirs();
+        if (indexDirs != null
+                && 
!Arrays.asList(indexDirs).equals(Arrays.asList(ledgerDirs))) {

Review Comment:
   @StevenLuMT I have considered the 1-to-1 situation you mentioned, but I 
think that in this tool, it does not care whether it is 1-to-1, but only 
focuses on whether the number of ledgerDirs and indexDirs and whether the 
absolute paths are the same.



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