[FLINK-40904][runtime] Detect FORWARD parallelism mismatch with the actual consumer parallelism - #29374
Open
1996fanrui wants to merge 2 commits into
Open
[FLINK-40904][runtime] Detect FORWARD parallelism mismatch with the actual consumer parallelism#293741996fanrui wants to merge 2 commits into
1996fanrui wants to merge 2 commits into
Conversation
…artitionDeploymentDescriptor A task can only see the number of subpartitions of its outputs, which is not the consumer parallelism on a POINTWISE edge. Pass the parallelism of the consuming job vertices through ResultPartitionDeploymentDescriptor and expose it via Environment#getWriterConsumerParallelism. No behavior change.
…ctual consumer parallelism The FORWARD-to-REBALANCE downgrade compared the producer parallelism with the number of subpartitions, which is not the consumer parallelism on a POINTWISE edge. Equal parallelism > 1 was taken as a mismatch, and N -> M with N > 1 could go undetected. Compare with the actual consumer parallelism instead and include both values in the log.
Collaborator
1996fanrui
force-pushed
the
FLINK-40904
branch
from
October 2, 2026 22:21
7dbc01a to
7c587b2
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
StreamTask replaces a ForwardPartitioner with a RebalancePartitioner when the parallelism of a FORWARD edge doesn't match (FLINK-30213). The check compares the producer parallelism with the number of subpartitions, which is not the consumer parallelism on a POINTWISE edge. Equal parallelism > 1 is taken as a mismatch, and N -> M with N > 1 can go undetected (e.g. 2 -> 4 with the DefaultScheduler, where half of the consumers get no data). Found in #29272 (comment).
Brief change log
ResultPartitionDeploymentDescriptorand expose it viaEnvironment#getWriterConsumerParallelism.StreamTaskcompares the producer parallelism with it instead of the number of subpartitions, and logs both values.Verifying this change
StreamTaskTest#testForwardPartitionerIsConvertedToRebalanceOnParallelismChangesnow simulates the change via the consumer parallelism.ResultPartitionDeploymentDescriptorTestcovers the new field.Does this pull request potentially affect one of the following parts
ResultPartitionDeploymentDescriptorcarries one more int)Documentation