walterddr commented on code in PR #10289:
URL: https://github.com/apache/pinot/pull/10289#discussion_r1110323511


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/executor/OpChainSchedulerService.java:
##########
@@ -35,115 +33,78 @@
  * This class provides the implementation for scheduling multistage queries on 
a single node based
  * on the {@link OpChainScheduler} logic that is passed in. Multistage queries 
support partial execution
  * and will return a NOOP metadata block as a "yield" signal, indicating that 
the next operator
- * chain ({@link OpChainScheduler#next()} will be requested.
- *
- * <p>Note that a yielded operator chain will be re-registered with the 
underlying scheduler.
+ * chain ({@link OpChainScheduler#next} will be requested.
  */
 @SuppressWarnings("UnstableApiUsage")
 public class OpChainSchedulerService extends AbstractExecutionThreadService {
-
   private static final Logger LOGGER = 
LoggerFactory.getLogger(OpChainSchedulerService.class);
-
-  private static final int TERMINATION_TIMEOUT_SEC = 60;
+  // Default time scheduler is allowed to wait for a runnable OpChain to be 
available
+  private static final long DEFAULT_SCHEDULER_NEXT_WAIT_MS = 100;
 
   private final OpChainScheduler _scheduler;
   private final ExecutorService _workerPool;
-  private final long _pollIntervalMs;
-
-  // anything that is guarded by this monitor should be non-blocking
-  private final Monitor _monitor = new Monitor();
-  private final Monitor.Guard _hasNextOrClosing = new Monitor.Guard(_monitor) {
-    @Override
-    public boolean isSatisfied() {
-      return _scheduler.hasNext() || !isRunning();
-    }
-  };

Review Comment:
   why do we remove the monitor? it is no longer necessary to guard the 
scheduler anymore?



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


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

Reply via email to