Skip to content

Conversation

addaleax
Copy link
Collaborator

MONGOSH-888

When a user interrupts running code while a change stream .next()
call is running, that closes the network connection. However,
network errors are considered retryable by the driver (in line
with the spec); this makes the change stream cursor .next()
operation attempt to re-try itself, which fails because the
MongoClient is already unusable at that point.

In order to address this, we call the driver-internal
Connection.handleIssue() method (which should be okay, since the
relevant code here is concerned only with driver internals anyway)
with a non-network-error state, which still closes ongoing operations.

…GOSH-888

When a user interrupts running code while a change stream `.next()`
call is running, that closes the network connection. However,
network errors are considered retryable by the driver (in line
with the spec); this makes the change stream cursor `.next()`
operation attempt to re-try itself, which fails because the
MongoClient is already unusable at that point.

In order to address this, we call the driver-internal
`Connection.handleIssue()` method (which should be okay, since the
relevant code here is concerned only with driver internals anyway)
with a non-network-error state, which still closes ongoing operations.
@addaleax addaleax merged commit f80f0af into main Jul 13, 2021
@addaleax addaleax deleted the 888-dev branch July 13, 2021 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants