sohami commented on a change in pull request #1334: DRILL-6385: Support JPPD feature URL: https://github.com/apache/drill/pull/1334#discussion_r207754353
########## File path: exec/java-exec/src/main/java/org/apache/drill/exec/work/WorkManager.java ########## @@ -375,6 +378,30 @@ protected void cleanup() { public FragmentExecutor getFragmentRunner(final FragmentHandle handle) { return runningFragments.get(handle); } + + public void receiveRuntimeFilter(final RuntimeFilterWritable runtimeFilter) { + BitData.RuntimeFilterBDef runtimeFilterDef = runtimeFilter.getRuntimeFilterBDef(); + boolean toForeman = runtimeFilterDef.getToForeman(); + QueryId queryId = runtimeFilterDef.getQueryId(); + //to foreman + if (toForeman) { + Foreman foreman = queries.get(queryId); + if (foreman != null) { + foreman.getRuntimeFilterManager().registerRuntimeFilter(runtimeFilter); Review comment: the `registerRuntimeFilter` and eventual broadcast all is happening on rpc thread which is not good since Rpc thread should be released ASAP. Please follow a model similar to **cancelForeman** in WorkManager to submit the `registerRuntimeFilter` task as new Runnable to WorkManager executor ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services