NODE-7987Backlog

Connection pool can check out a socket from the generation cleared before it finished handshaking

h3. Current behavior ConnectionPool.createConnection copies the pool generation into the connection options when the attempt starts. The success path then checks only that the pool state is ready. clear() increments the generation and pauses a non-load-balanced pool. ready() sets the pool ready again without moving the generation back. A handshake that was in flight across that sequence is checked out, or pushed into the available list, with the pre-clear generation. The pool spec does not allow

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
CMAP
Labels
Tags and classification
external-userneeds-investigation