Skip to content

Flink: Backport TableMaintenance Support Coordinator Lock to 1.20 and 2.0#15438

Merged
pvary merged 2 commits intoapache:mainfrom
Guosmilesmile:backport_coordinator_lock
Feb 25, 2026
Merged

Flink: Backport TableMaintenance Support Coordinator Lock to 1.20 and 2.0#15438
pvary merged 2 commits intoapache:mainfrom
Guosmilesmile:backport_coordinator_lock

Conversation

@Guosmilesmile
Copy link
Contributor

This pr is a backport for #15151 to Flink 1.20 and 2.0.
2.0 is a clearn backport, 1.20 need some small change.

@github-actions github-actions bot added the flink label Feb 25, 2026
@Guosmilesmile Guosmilesmile force-pushed the backport_coordinator_lock branch 2 times, most recently from 7e70057 to cc5ca72 Compare February 25, 2026 05:30
Copy link
Contributor Author

@Guosmilesmile Guosmilesmile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in 1.20

Comment on lines +60 to +61
lockRemoverOperator.setup(
parameters.getContainingTask(), parameters.getStreamConfig(), parameters.getOutput());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 1.20 we should add call setup().

Comment on lines +82 to +83
triggerManagerOperator.setup(
parameters.getContainingTask(), parameters.getStreamConfig(), parameters.getOutput());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 1.20 we should add call setup().

@Guosmilesmile Guosmilesmile force-pushed the backport_coordinator_lock branch from cc5ca72 to b43499e Compare February 25, 2026 05:40
Preconditions.checkArgument(
lockCheckDelayMs > 0, "Minimum lock delay rate should be at least 1 ms.");

this.processingTimeService = parameters.getProcessingTimeService();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add init processingTimeService from parameters.getProcessingTimeService().

@Guosmilesmile Guosmilesmile marked this pull request as draft February 25, 2026 06:24
@Guosmilesmile Guosmilesmile force-pushed the backport_coordinator_lock branch from b43499e to bc29766 Compare February 25, 2026 06:52
minFireDelayMs,
lockCheckDelayMs,
lockId);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add parameters with TestProcessingTimeService

@Guosmilesmile Guosmilesmile force-pushed the backport_coordinator_lock branch from bc29766 to ba611d5 Compare February 25, 2026 07:10
Comment on lines +52 to +60
LockRemoverOperator(
StreamOperatorParameters<Void> parameters,
OperatorEventGateway operatorEventGateway,
String tableName,
List<String> maintenanceTaskNames) {
this.tableName = tableName;
this.operatorEventGateway = operatorEventGateway;
this.maintenanceTaskNames = maintenanceTaskNames;
}
Copy link
Contributor Author

@Guosmilesmile Guosmilesmile Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove super(parameters);, The parent class has a no-argument constructor.

Comment on lines +88 to +99
TriggerManagerOperator(
StreamOperatorParameters<Trigger> parameters,
OperatorEventGateway operatorEventGateway,
List<String> maintenanceTaskNames,
List<TriggerEvaluator> evaluators,
long minFireDelayMs,
long lockCheckDelayMs,
String tableName) {
Preconditions.checkArgument(
maintenanceTaskNames != null && !maintenanceTaskNames.isEmpty(),
"Invalid maintenance task names: null or empty");
Preconditions.checkArgument(
Copy link
Contributor Author

@Guosmilesmile Guosmilesmile Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove super(parameters);, The parent class has a no-argument constructor.

@Guosmilesmile Guosmilesmile marked this pull request as ready for review February 25, 2026 08:01
@Guosmilesmile
Copy link
Contributor Author

@mxm @pvary If you have time, please take a look, thanks!

@pvary pvary merged commit d2fbe42 into apache:main Feb 25, 2026
16 checks passed
@pvary
Copy link
Contributor

pvary commented Feb 25, 2026

Merged to main.
Thanks @Guosmilesmile for the backport and fixing version differences and @mxm for the review!

@Guosmilesmile Guosmilesmile deleted the backport_coordinator_lock branch February 25, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants