-
Notifications
You must be signed in to change notification settings - Fork 4.1k
release-24.3: import: do not revert data if cancel called after success #159900
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
release-24.3: import: do not revert data if cancel called after success #159900
Conversation
|
Thanks for opening a backport. Before merging, please confirm that it falls into one of the following categories (select one):
Add a brief release justification to the PR description explaining your selection. Also, confirm that the change does not break backward compatibility and complies with all aspects of the backport policy. All backports must be reviewed by the TL and EM for the owning area. |
|
❌ PR #159900 does not comply with backport policy Confidence: high 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
michae2
left a comment
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.
LGTM
|
Reminder: it has been 2 weeks please merge or close your backport! |
b403073 to
5cb884b
Compare
Currently, it is possible that canceling an import after the job marked the descriptor as online could cause the non-mvcc compliant rollback code to run on an online range. Note, this fix is still slightly incomplete. If there is a zombie import job revert logic, that zombie may revert changes its not supposed to, but the liveness subsystem makes zombie jobs unlikely. Release note: Fixes an unlikely bug where import rollback could revert writes in an online descriptor. This is not a silent failure. It would only occur if the job entered a failed or cancelled state after the actual import succeeded and marked the descriptor as on line. Fixes: #159603
…IntoCSVCancel Fixes #161045 Following #159627, data rollback during import cancellation only occurs if the table descriptor has not yet been published (set back online). This introduced a race condition in TestImportIntoCSVCancel -- the final row count was non-deterministic depending on whether cancellation finished before or after the descriptor update. This change stabilizes the test by ensuring cancellation is triggered before the descriptor is brought online, guaranteeing that ingested data is always reverted. Release note: None
5cb884b to
764ed02
Compare
Backport 1/1 commits from #159627 on behalf of @jeffswenson.
Backport 1/1 commits from #161475 on behalf of @ZhouXing19.
Currently, it is possible that canceling an import after the job marked the descriptor as online could cause the non-mvcc compliant rollback code to run on an online range. Note, this fix is still slightly incomplete. If there is a zombie import job revert logic, that zombie may revert changes its not supposed to, but the liveness subsystem makes zombie jobs unlikely.
Release note: Fixes an unlikely bug where import rollback could revert writes in an online descriptor. This is not a silent failure. It would only occur if the job entered a failed or cancelled state after the actual import succeeded and marked the descriptor as on line.
Fixes: #159603
Release justification: bug fix.