-
Notifications
You must be signed in to change notification settings - Fork 287
Fix iscp executor #23415
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
base: main
Are you sure you want to change the base?
Fix iscp executor #23415
Conversation
2d6aedc to
de27cb7
Compare
Merge Queue Status🚫 The pull request has left the queue (rule: This pull request spent 20 minutes 14 seconds in the queue, with no time running CI. Required conditions to merge
ReasonThe merge conditions cannot be satisfied due to failing checks HintYou may have to fix your CI before adding the pull request to the queue again. |
What type of PR is this?
Which issue(s) this PR fixes:
issue #23414
What this PR does / why we need it:
Fix: Transaction broken during cluster snapshot restore
Problem: During cluster snapshot restore, each DDL operation commits separately instead of executing within a single transaction, breaking transaction atomicity.
Root Cause: The
doDropAccountfunction always creates its own transaction (begin;+finishTxn), even when called from within an existing transaction. WhenrestoreToClustercallsdropExistsAccount->doDropAccountto drop accounts, this internal transaction breaks the outer transaction started bydoRestoreSnapshot, causing subsequent operations to run in autocommit mode.Solution: Added an optional
inTransactionparameter todoDropAccount. WheninTransaction=true, the function skips creating a new transaction and uses the existing one. UpdateddropExistsAccountto passinTransaction=trueduring restore operations.Changes:
authenticate.go: AddedinTransaction ...boolparameter todoDropAccount, conditionally create transactionsnapshot.go: PassinTransaction=truewhen callingdoDropAccountfromdropExistsAccountImpact: Restore operations now correctly execute within a single transaction. Direct
DROP ACCOUNTcommands remain unchanged (backward compatible).