rkhachatryan commented on code in PR #29954:
URL: https://github.com/apache/flink/pull/29954#discussion_r4607197660
##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java:
##########
@@ -1894,7 +1894,18 @@ private void tryShutdownTimerService(long timeoutMs,
TimerService timerService)
public void dispatchOperatorEvent(OperatorID operator,
SerializedValue<OperatorEvent> event)
throws FlinkException {
try {
+ // Operator events must be urgent: the coordinator considers an
event delivered once it
+ // is enqueued here, and it may then take a checkpoint that must
include the event's
+ // effect (e.g. AddSplitEvent). Unaligned checkpoint triggers are
urgent mails (see
+ // triggerCheckpointAsync), so a normal mail could be overtaken by
the trigger. Urgent
+ // mails are executed in FIFO order among themselves
(TaskMailboxImpl keeps them in a
+ // dedicated FIFO urgent queue served before the batch; both mails
are put with the
+ // same priority), which preserves the ordering.
+ // This is also safe for an aligned trigger (a normal mail): the
coordinator's gateway
+ // stays closed from its checkpoint until the task's
AcknowledgeCheckpointEvent, which
+ // is sent after the task-side snapshot, so later events can't
overtake the snapshot.
mainMailboxExecutor.execute(
+ MailboxExecutor.MailOptions.urgent(),
Review Comment:
I agree, created FLINK-41547 to track it.
--
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]