SERVER-136427Backlog

Clustered collscan: Avoid overshooting inclusive range boundaries

Clustered indices are always unique, so once we hit the end of a range with inclusive boundary, we can immediately seek to the beginning of the next range/flag the stage as EOF instead of calling another cursor->next() & only noticing the overshoot afterwards. Reference: [SBE|https://github.com/10gen/mongo/blob/81b916c3ca9757cd95f68b6658e01db2f421f52e/src/mongo/db/exec/sbe/stages/multi_range_clustered_scan_stage.cpp#L88] and [classic|https://github.com/10gen/mongo/blob/81b916c3ca9757cd95f68b6

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.