zentol opened a new pull request #8972: [FLINK-13060][coordination] Respect restart constraints in new RegionFailover strategy URL: https://github.com/apache/flink/pull/8972 Based on #8922. Ignore everything but my commit. Extends the added `AdaptedRestartPipelinedRegionStrategyNG` to respect restart constraints imposed by the configured `RestartStrategy`. Currently, the failover strategy does query `RestartStrategy#canRestart` before executing a failover, but the RS is never informed about this failover happening. As a result it is not taken into account for the maximum number of failure attempts (or max rate), nor is the restart delay honored. This PR modifies the `AdaptedRestartPipelinedRegionStrategyNG` to call `RestartStrategy#restart` before executing any failover, with a `RestartCallback` that will execute the failover logic. This change has a few repercussion on existing tests. Since the execution of the failover logic is now dependent on the restart strategy actually using the callback, we may no longer rely on the `InfiniteDelayRestartStrategy` as this one does not do so. Additionally, since restart strategies use the `schedule` method, we now have to additionally call `ManuallyTriggeredScheduledExecutor#triggerScheduledTasks`, as `#triggerAll` (for some reason) ignores scheduled tasks. `AdaptedRestartPipelinedRegionStrategyNGFailoverTest#testFailoverExecutionDependentOnRestartStrategyRecoveryTrigger` tests that the failover behavior is dependent on the restart strategy. I'm not really happy with the test, as it effectively pauses the failover progress (after canceling the tasks, but before resetting them) and I suppose the exact state we should be in at this point is not well-defined.
---------------------------------------------------------------- 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] With regards, Apache Git Services
