Skip to content

Conversation

@dawidwys
Copy link
Contributor

@dawidwys dawidwys commented Dec 2, 2025

What is the purpose of the change

Fixes a bug where an incorrect type is used in sink for

  • shuffling
  • sink upsert materializer
  • constraint validation

Verifying this change

Added a test in SinkTestPrograms

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, 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)

@dawidwys dawidwys requested a review from twalthr December 2, 2025 14:32
@flinkbot
Copy link
Collaborator

flinkbot commented Dec 2, 2025

CI report:

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

Copy link
Contributor

@twalthr twalthr left a comment

Choose a reason for hiding this comment

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

Thanks @dawidwys. +1 for this. Please update the release notes and let people know about the past inconsistency and that there is a potential restoring issue but the state was corrupted anyways.

Copy link
Contributor

@twalthr twalthr left a comment

Choose a reason for hiding this comment

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

Thank you for digging deeper and fixing this bug in a backwards compatible way. I left some last comments.

// We introduced a new version, because statements that were never rolling back to a value from
// state could run succesfully. We allow those jobs to be upgraded. Without a new versions such jobs
// would fail on restore, because the state serializer would differ
@ExecNodeMetadata(
Copy link
Contributor

Choose a reason for hiding this comment

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

Batch version can stay at v1. There is no upgrade story that would interrupt a running batch job. I did it similarly for scan_v2, where I just updated v1 to the new behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Overlooked that in your commit

@Override
protected Stream<String> getSavepointPaths(
TableTestProgram program, ExecNodeMetadata metadata) {
// disable the writable metadata test for sink node with version 1. it fails after the
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we generalize this into a method in RestoreTestBase that TableSinkRestoreTest can implement for ignoring certain programs with versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if that's what you had in mind, but I refactored it a bit.

Copy link
Contributor

@twalthr twalthr left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for leveraging the version infrastructure and ensuring backwards compatibility.

@dawidwys
Copy link
Contributor Author

Thank you. I'll just squash the commits to run the CI on a final version that I can merge 👍

@dawidwys dawidwys merged commit c028790 into apache:master Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants