Samrat002 opened a new pull request, #27921:
URL: https://github.com/apache/flink/pull/27921
## What is the purpose of the change
FLIP-461 introduced checkpoint-synchronized rescaling where the Adaptive
Scheduler waits for a checkpoint to complete before rescaling. However, it
passively waits for the next periodic checkpoint, which can delay rescaling
significantly when checkpoint intervals are large (e.g., 10 minutes).
This PR makes the Adaptive Scheduler actively trigger a checkpoint when
resources change and rescaling is desired. The trigger fires at the right time.
ie, when the `DefaultStateTransitionManager` enters the Stabilizing or
Stabilized phase (i.e., when the resource gate is open and the scheduler is
waiting for the checkpoint gate). The feature is controlled by a new
configuration option
`jobmanager.adaptive-scheduler.rescale-trigger.active-checkpoint.enabled`
(default: false).
The feature respects `execution.checkpointing.min-pause`, skips if a
checkpoint is already in progress, and only fires when parallelism has actually
changed.
## Brief change log
- Added requestActiveCheckpointTrigger() to StateTransitionManager.Context
interface
- DefaultStateTransitionManager calls requestActiveCheckpointTrigger()
when entering Stabilizing, on onChange during Stabilizing, and when entering
Stabilized
- Executing implements the callback with guard conditions (config enabled,
checkpointing configured, parallelism changed, no checkpoint in progress)
- Added config option
jobmanager.adaptive-scheduler.rescale-trigger.active-checkpoint.enabled wired
through AdaptiveScheduler.Settings
- Added integration test proving rescale happens without periodic
checkpoints or manual triggers
## Verifying this change
This change added tests and can be verified as follows:
- Added `RescaleOnCheckpointITCase#testRescaleWithActiveCheckpointTrigger`
that starts a job with checkpointing interval of 1 hour, maxTriggerDelay set to
infinity, and no manual triggerCheckpoint() call.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
@Public(Evolving): no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: yes
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? JavaDocs
--
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]