milleruntime commented on code in PR #2764:
URL: https://github.com/apache/accumulo/pull/2764#discussion_r894422364


##########
core/src/main/java/org/apache/accumulo/core/gc/Reference.java:
##########
@@ -36,7 +35,6 @@ public Reference(TableId tableId, String metadataEntry) {
     
MetadataSchema.TabletsSection.ServerColumnFamily.validateDirCol(tableId.canonical());
     this.tableId = tableId;
     this.metadataEntry = metadataEntry;
-    this.tabletDir = metadataEntry;
   }

Review Comment:
   Yeah, this is where we collect the references in the GC:
   
https://github.com/apache/accumulo/blob/main/server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java#L149-L156
   
   This chunk of code is confusing to me and I am currently working on PR to 
break it up into multiple lines with comments.
   
   
   > In fact, you may be able to remove ReferenceDirectory if you have the 
ability to determine if the metadata entry is a directory.
   
   I had originally created this class as a concrete way to differentiate 
between the two types here:
   
https://github.com/apache/accumulo/blob/37e1c6f275cca0b118ed6ab631345c0699515552/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java#L142
   
   But I could make a `isDirectory()` method that gets overridden. 
   



-- 
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: notifications-unsubscr...@accumulo.apache.org

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

Reply via email to