-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
Conversation
@HeartSaVioR |
changelogWriter.foreach(_.abort()) | ||
} finally { | ||
changelogWriter = None | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 !
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What changes were proposed in this pull request?
In
commit()
,changelogWriter
is set toNone
before iterating.This PR calls
abort()
on thechangelogWriter
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