sohami commented on a change in pull request #1504: DRILL-6792: Find the right 
probe side fragment wrapper & fix DrillBuf…
URL: https://github.com/apache/drill/pull/1504#discussion_r230520412
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContextImpl.java
 ##########
 @@ -362,12 +368,35 @@ public boolean isUserAuthenticationEnabled() {
 
   @Override
   public void addRuntimeFilter(RuntimeFilterWritable runtimeFilter) {
-    this.runtimeFilterSink.aggregate(runtimeFilter);
+    this.runtimeFilterWritable = runtimeFilter;
+    if (enableRFWaiting) {
+      condition.signal();
+    }
 
 Review comment:
   We can add the runtimeFilterWritable under `lock()` to prevent any race 
condition although there is no harm with this race. But there is no issue in 
adding it under lock either that way its clear that lock and condition variable 
is for `runtimeFilterWritable`.
   
   ```
   lockForRF.lock()
   try () {
        this.runtimeFilterWritable = runtimeFilter;
        if (enableRFWaiting) {
             // wake up the waiting thread in RuntimeFilterRecordBatch
             conditionForRF.signal();
        }
   } finally {
       lockForRF.unlock()
   }
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to