drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sohami commented on a change in pull request #1459: DRILL-6731: Move the BFs aggregating work from the Foreman to the RuntimeFi…
Date Wed, 26 Sep 2018 20:26:17 GMT
sohami commented on a change in pull request #1459: DRILL-6731: Move the BFs aggregating work
from the Foreman to the RuntimeFi…
URL: https://github.com/apache/drill/pull/1459#discussion_r220710747
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/work/filter/RuntimeFilterSink.java
 ##########
 @@ -89,16 +142,27 @@ public void close() throws Exception {
 
     @Override
     public void run() {
-      while (running.get()) {
-        RuntimeFilterWritable toAggregate = rfQueue.poll();
-        if (toAggregate != null) {
-          if (aggregated != null) {
-            aggregated.aggregate(toAggregate);
-            currentBookId.incrementAndGet();
+      try {
+        while (running.get()) {
+          RuntimeFilterWritable toAggregate = rfQueue.take();
+          if (!running.get()) {
+            toAggregate.close();
+            return;
+          }
+          if (containOne()) {
+            try {
+              aggregatedRFLock.lock();
+              aggregated.aggregate(toAggregate);
 
 Review comment:
   `aggregated.close()` should be called to release Drillbuff reference it's holding to since
`aggregate()` will not do that. This change is part of branch shared in above comment.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message