-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Directly calling self.__exhaust_mgr.close() in Cursor.__del__ can lead to a deadlock. In jesse's words:
It'd require an exhaust cursor to be part of a circular reference that happens to be cleaned up by a GC run triggered while a thread is holding the pool's lock, thus it's so absurdly rare we've never seen it. Nevertheless, we should return an exhaust cursor's socket to the pool in MongoClient._process_periodic_tasks, not synchronously in Cursor.__del__.
- causes
-
MOTOR-770 Test failure - test_exhaust
- Closed
- related to
-
PYTHON-799 Rare deadlock in Cursor destructor
- Closed
-
PYTHON-1636 Support Exhaust Cursor in OP_MSG
- Closed
-
PYTHON-2673 Connection pinning behavior for load balanced clusters
- Closed