Publication date: February 7, 2022
Description
In very specific cases, queries can miss rows in a primary or unique index that is being scanned, causing incorrect query results. The problem can occur only when the query plan involves a scan when all of the following are true:
- Retrieves at least 10MB of data
- Spans multiple ranges
- Involves scanning isolated keys from the index (for example, derived from conditions involving
IN
).
Any CockroachDB deployment with an affected version can exhibit the issue, but it seems to be rare in practice.
Versions affected: v21.2.0 - v21.2.4
Statement
This is resolved in CockroachDB by PR #75475 which fixes the metadata returned by the KV layer when some of the isolated key spans are not scanned.
The fix has been applied to maintenance release v21.2.5.
This public issue is tracked by #74736.
Mitigation
Users of CockroachDB v21.2.0 - v21.2.4 are encouraged to upgrade to v21.2.5 or a later version.
Impact
Queries might have returned incorrect results in rare cases.
Please reach out to the support team if you need more information or assistance.