Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MINOR] Abort changelog writer before resetting #48153

Closed
wants to merge 2 commits into from

Conversation

tedyu
Copy link
Contributor

@tedyu tedyu commented Sep 18, 2024

What changes were proposed in this pull request?

In commit(), changelogWriter is set to None before iterating.

This PR calls abort() on the changelogWriter before resetting.
This is consistent with what rollback does.

Why are the changes needed?

To properly handle the abort of changelogWriter.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing test suite.

Was this patch authored or co-authored using generative AI tooling?

No

@tedyu tedyu changed the title Abort changelog writer before resetting [Minor] Abort changelog writer before resetting Sep 18, 2024
@tedyu
Copy link
Contributor Author

tedyu commented Sep 18, 2024

@HeartSaVioR
Can you take a look ?

@HyukjinKwon HyukjinKwon changed the title [Minor] Abort changelog writer before resetting [MINOR] Abort changelog writer before resetting Sep 18, 2024
changelogWriter.foreach(_.abort())
} finally {
changelogWriter = None
}
Copy link
Member

Choose a reason for hiding this comment

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

Seems like #48148 includes this fix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I came up with this PR around the same time as #48148.

Since the fix is independent of the above PR, do you think this can go in first ?

Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@tedyu - Actually we can't do the abort at all here. we need to ensure that the changelog file is written out. Otherwise it breaks reading the state in change-data-feed mode. Pls take a look at my fix - thx !

Copy link
Contributor

Choose a reason for hiding this comment

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

we can maybe just fix the update on the error message tho as part of this PR. Will let @HeartSaVioR decide

Copy link
Contributor

Choose a reason for hiding this comment

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

This was actually fixed via #48125 - the PR #48125 was up a couple days ahead on this.
@tedyu Thanks for your contribution and nice finding.

@tedyu tedyu closed this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants