SERVER-132717In Progress

Record getMore errors raised after a cursor has been exhausted

Cursor read errors on mongod are recorded by stamping the error code on the ClientCursor, so that the query stats entry written when it is disposed attributes the failure to the query shape.   This does not work for the last getMore of a cursor's life. When a getMore exhausts its cursor, acquireLocksAndIterateCursor() deletes the cursor as it returns, and ClientCursor::dispose() writes the shape's entry at that moment, as a success. Anything that throws afterwards (in production, only the line

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.