Skip to content

[FLINK-38967] Fix flaky UnalignedCheckpointFailureHandlingITCase#27466

Merged
ferenc-csaky merged 2 commits intoapache:masterfrom
mateczagany:FLINK-38967
Jan 28, 2026
Merged

[FLINK-38967] Fix flaky UnalignedCheckpointFailureHandlingITCase#27466
ferenc-csaky merged 2 commits intoapache:masterfrom
mateczagany:FLINK-38967

Conversation

@mateczagany
Copy link
Copy Markdown
Contributor

What is the purpose of the change

UnalignedCheckpointFailureHandlingITCase fails intermittently as a race condition was not properly handled in the test code.

Brief change log

  • Instead of Thread.sleep, check the value of failOnCloseRef to make sure that the channel state writer had the opportunity to call the closeAndGetHandle and close methods.

Verifying this change

Could not reproduce the test failure anymore

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: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented Jan 23, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@RocMarshal RocMarshal self-assigned this Jan 23, 2026
}
}
}
} while (!foundCheckpointFailure || failOnCloseRef.get().get());
Copy link
Copy Markdown
Contributor

@davidradl davidradl Jan 23, 2026

Choose a reason for hiding this comment

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

without the sleep isn't this now a tight loop until it completes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it's not that bad, as there is also a call to trigger the checkpoint that also waits for the result

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

fair enough

@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label Jan 23, 2026
if (cpFailure.isPresent()) {
if (isCausedBy(cpFailure.get(), expectedException)) {
foundCheckpointFailure = true;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If it's not caused by expected exception, shall we still rethrow to ail fast with actual error ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea, thank you, added that.

}
}
}
} while (!foundCheckpointFailure || failOnCloseRef.get().get());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

fair enough

@ferenc-csaky ferenc-csaky merged commit fdf1a2e into apache:master Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants