sql: Remove the need for FORCE in transactions with multiple multi-region operations #61551
Labels
A-multiregion
Related to multi-region
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
GA-blocker
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: