adasari commented on code in PR #19167:
URL: https://github.com/apache/pinot/pull/19167#discussion_r3724627090


##########
pinot-core/src/main/java/org/apache/pinot/core/query/scheduler/SecondaryWorkloadQueue.java:
##########
@@ -158,4 +170,14 @@ private void 
checkSchedulerGroupCapacity(SchedulerQueryContext query)
               + _resourceManager.getTableThreadsHardLimit());
     }
   }
+
+  /// Signals the reader that reserved threads were released, so canSchedule() 
may now pass.
+  public void signalWorkersReleased() {
+    _queueLock.lock();
+    try {
+      _queryReaderCondition.signal();
+    } finally {
+      _queueLock.unlock();
+    }
+  }

Review Comment:
   not worth changing? if the queue is empty, a waiting thread wakes, 
reacquires the lock, sees the queue is empty, and waits again.



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