Skip to content

Commit 6ab2307

Browse files
committed
try without pool clear on operation failure
1 parent 062d8be commit 6ab2307

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pymongo/asynchronous/topology.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,9 @@ async def _handle_error(self, address: _Address, err_ctx: _ErrorContext) -> None
887887
# Unknown command error during the connection handshake.
888888
if not self._settings.load_balanced:
889889
await self._process_change(ServerDescription(address, error=error))
890-
# Clear the pool if the backpressure label was not applied.
891-
if not error.has_error_label("SystemOverloadedError"):
892-
await server.reset(service_id)
890+
# # Clear the pool if the backpressure label was not applied.
891+
# if not error.has_error_label("SystemOverloadedError"):
892+
# await server.reset(service_id)
893893
elif isinstance(error, ConnectionFailure):
894894
if isinstance(error, WaitQueueTimeoutError) or (
895895
error.has_error_label("SystemOverloadedError")

pymongo/synchronous/topology.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,9 @@ def _handle_error(self, address: _Address, err_ctx: _ErrorContext) -> None:
885885
# Unknown command error during the connection handshake.
886886
if not self._settings.load_balanced:
887887
self._process_change(ServerDescription(address, error=error))
888-
# Clear the pool if the backpressure label was not applied.
889-
if not error.has_error_label("SystemOverloadedError"):
890-
server.reset(service_id)
888+
# # Clear the pool if the backpressure label was not applied.
889+
# if not error.has_error_label("SystemOverloadedError"):
890+
# server.reset(service_id)
891891
elif isinstance(error, ConnectionFailure):
892892
if isinstance(error, WaitQueueTimeoutError) or (
893893
error.has_error_label("SystemOverloadedError")

0 commit comments

Comments
 (0)