wchevreuil commented on code in PR #5939:
URL: https://github.com/apache/hbase/pull/5939#discussion_r1775043970


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/janitor/CatalogJanitor.java:
##########
@@ -422,7 +426,16 @@ private static Pair<Boolean, Boolean> 
checkRegionReferences(MasterServices servi
     try {
       HRegionFileSystem regionFs = HRegionFileSystem
         .openRegionFromFileSystem(services.getConfiguration(), fs, tabledir, 
region, true);
-      boolean references = regionFs.hasReferences(tableDescriptor);
+      ColumnFamilyDescriptor[] families = tableDescriptor.getColumnFamilies();
+      boolean references = false;
+      for (ColumnFamilyDescriptor cfd : families) {
+        StoreFileTracker sft = 
StoreFileTrackerFactory.create(services.getConfiguration(),
+          tableDescriptor, 
ColumnFamilyDescriptorBuilder.of(cfd.getNameAsString()), regionFs);
+        references = references || sft.hasReferences();
+        if (references) {
+          break;
+        }
+      }

Review Comment:
   >This should only be true for WRITE mode of SFT instance right? there could 
be multiple instances of READ only mode SFT for the same store.
   
   How would the "READ_ONLY" SFTs know that the "WRITER" had rotated the file? 
Specially if its on a different process, like here? Other master based 
processes such as split take it for granted since the region would be closed, 
but I don't think it's the case here.



-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to