clintropolis commented on a change in pull request #9982:
URL: https://github.com/apache/druid/pull/9982#discussion_r437755142



##########
File path: 
processing/src/main/java/org/apache/druid/segment/join/HashJoinSegment.java
##########
@@ -98,4 +101,30 @@ public void close() throws IOException
   {
     baseSegment.close();
   }
+
+  @Override
+  public Optional<Closeable> acquireReferences()
+  {
+    Closer closer = Closer.create();
+    boolean acquireFailed = baseSegment.acquireReferences().map(closeable -> {
+      closer.register(closeable);
+      return false;
+    }).orElse(true);
+
+    for (JoinableClause claws : clauses) {
+      if (acquireFailed) {
+        break;
+      }
+      acquireFailed |= claws.acquireReferences().map(closeable -> {

Review comment:
       modified javadoc to more clearly explain the contract

##########
File path: 
processing/src/main/java/org/apache/druid/segment/join/table/IndexedTable.java
##########
@@ -30,8 +31,11 @@
  *
  * The main user of this class is {@link IndexedTableJoinable}, and its main 
purpose is to participate in joins.
  */
-public interface IndexedTable
+public interface IndexedTable extends ReferenceCountedObject
 {
+  @SuppressWarnings("unused")
+  String version();

Review comment:
       added




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to