Description
The problem affects multi-region tables whose locality has been altered toREGIONAL BY ROW in clusters running versions to . The problem occurs when dropping a region: the drop may proceed when instead it should have yielded an error. Any subsequent attempt at changing the locality of the table will fail with an internal error.
This can be reproduced as follows in cockroach demo --multitenant=false --global --nodes 9 --insecure --empty:
Statement
This is resolved in CockroachDB by fixes which ensure that: back-references to tables using the region enum type are correctly updated in the region enum type descriptor when performingALTER TABLE … SET LOCALITY REGIONAL BY ROW; any existing type descriptors which are already missing these back-references are updated prior to ALTER DATABASE … DROP [SUPER] REGION so as to ensure its correct behavior.
The fix has been applied to the maintenance release of CockroachDB .
Mitigation
Users of CockroachDB v22.1.0 to v22.1.3 with multi-region databases are encouraged to upgrade to the maintenance version or above.Impact
Versions v22.1.0 to v22.1.3 are affected. In these versions, multi-region tables whose locality has been altered toREGIONAL BY ROW are at risk of being corrupted.
Questions about any technical alert can be directed to our support team.
