zhuzhurk opened a new pull request #13958:
URL: https://github.com/apache/flink/pull/13958


   ## What is the purpose of the change
   
   After switching to pipelined region scheduling, all vertices in an DataSet 
iteration job will be eagerly scheduled, which means BLOCKING result consumers 
can be deployed even before the result finishes and resource waste happens. 
This is because all vertices will be put into one pipelined region if the job 
contains ColocationConstraint, see 
[PipelinedRegionComputeUtil](https://github.com/apache/flink/blob/c0f382f5f0072441ef8933f6993f1c34168004d6/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/PipelinedRegionComputeUtil.java#L52).
   
   This makeAllOneRegion() behavior was introduced to ensure co-located 
iteration head and tail to be restarted together in pipelined region failover. 
However, given that edges within an iteration will always be PIPELINED 
([ref](https://github.com/apache/flink/blob/0523ef6451a93da450c6bdf5dd4757c3702f3962/flink-optimizer/src/main/java/org/apache/flink/optimizer/plantranslate/JobGraphGenerator.java#L1188)),
 co-located iteration head and tail will always be in the same region. So we 
can drop the PipelinedRegionComputeUtil#makeAllOneRegion() code path and build 
regions for iteration jobs in the normal way.
   
   ## Verifying this change
   
   *Added UT for the checking that iteration head and tail must be in one 
pipelined region*.
   *This change is already covered by existing iteration tests*.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** 
/ don't know)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (**yes** / no / 
don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (**not applicable** / docs / 
JavaDocs / not documented)
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to