-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Internal, Query Operations
-
None
The SDAM spec says that certain command errors "detected from a getLastError response, write command response, or query response" must reset the server's SDAM state:
https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#not-master-and-node-is-recovering
PyMongo does this for write commands and getLastError but not for command errors for find/getMore. I've marked this as minor because these kinds of errors mean the server is in the process of shutting down or stepping down in which case the connections will be closed and a future heartbeat will update the SDAM state anyway.