> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Technical Advisory 74736

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 by a fix in CockroachDB 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.

## 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](https://support.cockroachlabs.com/) if you need more information or assistance.
