fredia commented on code in PR #24667:
URL: https://github.com/apache/flink/pull/24667#discussion_r1578815645


##########
flink-runtime/src/main/java/org/apache/flink/runtime/asyncprocessing/AsyncExecutionController.java:
##########
@@ -220,12 +283,17 @@ <IN, OUT> void insertBlockingBuffer(StateRequest<K, IN, 
OUT> request) {
      * @param force whether to trigger requests in force.
      */
     void triggerIfNeeded(boolean force) {
-        // TODO: introduce a timeout mechanism for triggering.
         if (!force && stateRequestsBuffer.activeQueueSize() < batchSize) {
+            // if the active queue size is 1, it means that the current 
request is the oldest one in
+            // the active queue.
+            if (stateRequestsBuffer.activeQueueSize() == 1) {
+                scheduleTimeout(currentTriggerSeq.get());
+            }

Review Comment:
   No,  there will definitely be a trigger between two 
`stateRequestsBuffer.activeQueueSize() == 1`, so when the two 
`stateRequestsBuffer.activeQueueSize() == 1` conditions are met, seq number 
must be different. 



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

Reply via email to