-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: Remove the need for FORCE in transactions with multiple multi-region operations #61551
Comments
I think this should follow quite nicely once #61585 goes in. All we need to do is construct a |
Correction on the comment above -- we can't use |
Currently we need to specify FORCE for all transactions which contain multiple multi-region operations. This is because
validateZoneConfigForMultiRegionDatabaseWasNotModifiedByUser
first generates a zone configuration based on theRegionConfig
, and compares that with the existing zone configuration to see if the user has made any modification. The problem with transactions where there are multiple multi-region operations is that the first operation will modify the RegionConfig, but the corresponding zone configuration is not modified until the subsequent schema change job is complete. As a result,validateZoneConfigForMultiRegionDatabaseWasNotModifiedByUser
thinks that the user has made a change to the zone configuration, when in fact it's just keying off a partial transaction state.The fix for this problem is to leverage the refactoring going into #60620 to then generate the comparison zone configuration based on the state which existed at the beginning of the transaction. That way,
validateZoneConfigForMultiRegionDatabaseWasNotModifiedByUser
will only indicate that a FORCE is required if a user modified zone configuration state existed at the beginning of the transaction.The text was updated successfully, but these errors were encountered: