Publication date: September 24, 2020.

Description

CockroachDB introduced a bug in the v20.1.4 release that affects UPSERT and INSERT … ON CONFLICT DO UPDATE SET x = excluded.x statements involving more than 10,000 rows. This bug results in the following behavior:

  • The execution of a single UPSERT statement will stop, without a visible error, after reaching 10,000 rows. The reported number of affected rows will be incorrect, reported as 0.
  • Executing a single UPSERT … RETURNING statement will return at most 10,000 rows.

This bug was introduced in #51944, which was intended to correct a previously-identified error in UPSERT handling. A fix (#54418) is available in the v20.1.6 release.

Statement

To track this issue, see #54418, the pull request correcting the aforementioned bugs.

Mitigation

This regression is critical as it could silently corrupt SQL data without remediation. All unaffected customers are urged to skip releases v20.1.4 and v20.1.5 or ensure that their application code processes at most 10,000 rows per UPSERT statement. Customers running versions v20.1.4 or v20.1.5 are strongly encouraged to upgrade to v20.1.6.

Impact

All deployments running CockroachDB v20.1.4 release and v20.1.5 release are affected. Cockroach Labs has issued a fix in v20.1.6. All of the other supported releases (v19.1.X, v19.2.X, v20.1.0-20.1.3) are not impacted.

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



Yes No