Technical Advisory 50587

On this page Carat arrow pointing down

Publication date: July 6, 2020

Description

When executing a TRUNCATE statement on a table, CockroachDB creates a new table with a new descriptor ID, copies the contents from the old table to the new table, and then drops the old table. When the old table is dropped, a drop job is created to asynchronously clean up the table's data. In v19.2, v19.1, and prior versions, a job ID is assigned to the old table prior to copying its contents to the new table. This means that the new table descriptor will have a populated drop job ID. This drop job ID prevents the table from being renamed.

Statement

This bug has been fixed in versions v19.1.11 and v19.2.9. All users are encouraged to upgrade to the latest maintenance release (see Mitigation below).

The public issue is tracked as #50587.

Mitigation

Customers on v19.1.0 - v19.1.10 and v19.2.0 - v19.2.8 are strongly encouraged to upgrade to the next maintenance release containing the fix. The scenario can be avoided on clusters still running v19.1.10 and earlier, or v19.2.8 and earlier, by delaying ALTER TABLE RENAME statements for any table that was previously truncated, until the upgrade is completed.

Impact

All CockroachDB v19.x releases up to and including v19.1.10 and v19.2.8 are affected.

Questions about any technical alert can be directed to our support team.


Yes No
On this page

Yes No