[FLINK-39898][runtime] Fire processing-time timers between unaligned checkpoints when mini-batch is enabled#28484
Open
wilmerdooley wants to merge 1 commit into
Open
[FLINK-39898][runtime] Fire processing-time timers between unaligned checkpoints when mini-batch is enabled#28484wilmerdooley wants to merge 1 commit into
wilmerdooley wants to merge 1 commit into
Conversation
Collaborator
…checkpoints when mini-batch is enabled Generated-by: Claude Code Signed-off-by: wilmerdooley <wilmerdooley1@gmail.com>
adfdf13 to
62d5d27
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
When both
table.exec.mini-batch.enabledandexecution.checkpointing.unaligned.enabledare on, ProcessingTimeService timer callbacks are not fired between checkpoints; they only run during checkpoint barrier handling. This is a regression from 1.20 introduced by the urgent-mail system (FLINK-35796): unaligned checkpoint barriers are submitted as urgent mails, andTaskMailboxImplthen skipped non-urgent mails (the timer callbacks) while an urgent mail was present, starving them until the next checkpoint.This change lets non-urgent mails make progress when the batch would otherwise be empty, without changing urgent-mail prioritization.
Brief change log
TaskMailboxImpl.moveUrgentMailsToBatchIfNeeded: computeshouldOnlyMoveUrgentMails = onlyMoveUrgentMails && !isBatchEmptyand gate the non-urgent put-back/break on it, so when the batch is empty a non-urgent mail is moved into the batch instead of being returned to the queue and skipped. Urgent mails still take FIFO priority viabatch.addFirst.Verifying this change
This change added a unit test:
TaskMailboxImplTest.testNonUrgentMailQueuedBehindUrgentMailIsTakenFromBatchasserts that a non-urgent mail queued behind an urgent mail is still taken from the batch (not starved) while the urgent mail is taken first. The test fails on the pre-fix code, where the non-urgent mail was returned to the queue and skipped.Does this pull request potentially affect one of the following parts
@Public(Evolving): noDocumentation
This PR was written with the assistance of generative AI tooling.
Generated-by: Claude Code
JIRA: https://issues.apache.org/jira/browse/FLINK-39898