DomGarguilo commented on code in PR #3980:
URL: https://github.com/apache/accumulo/pull/3980#discussion_r1408273744


##########
server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java:
##########
@@ -176,9 +176,10 @@ public Stream<Reference> getReferences() {
     if (level == Ample.DataLevel.ROOT) {
       tabletStream = Stream.of(context.getAmple().readTablet(RootTable.EXTENT, 
DIR, FILES, SCANS));
     } else {
-      var tabletsMetadata = 
TabletsMetadata.builder(context).scanTable(level.metaTable())
-          .checkConsistency().fetch(DIR, FILES, SCANS).build();
-      tabletStream = tabletsMetadata.stream();
+      try (TabletsMetadata tm = 
TabletsMetadata.builder(context).scanTable(level.metaTable())

Review Comment:
   Addressed in cc9bc8a by adding an `onClose()` which closes the 
`TabletsMetadata` and made sure the places using this method close the stream.



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