Commit Graph

12 Commits

Author SHA1 Message Date
Shane Harvey
278a50d4b0
PYTHON-3005 Make maxConnecting configurable (#789) 2021-11-16 12:51:36 -08:00
Shane Harvey
2f3acb6bc2
PYTHON-2941 Add a CMAP test that verifies the background thread hands over connections to threads doing checkout (#780) 2021-11-05 15:05:05 -07:00
Shane Harvey
97a84e199e
PYTHON-2697 Fix races in various CMAP spec tests (#685) 2021-07-29 17:25:15 -07:00
Shane Harvey
f64b563d9e
PYTHON-2629 Use hello command when API Version is declared (#610)
PYTHON-2697 Update CMAP runner to ignore extra events
2021-05-10 14:33:51 -07:00
Shane Harvey
86b40c195d
PYTHON-2462 Avoid connection storms: implement pool PAUSED state (#531)
Mark server unknown and clear the pool when background connections fail.
Eagerly evict threads from the wait queue when pool is paused. Evicted
threads will raise the following error:
AutoReconnect('localhost:27017: connection pool paused')
Introduce PoolClearedEvent and ConnectionPoolListener.pool_ready.

CMAP spec test changes:
- CMAP unit tests should not use real monitors
- Assert that CMAP threads complete all scheduled operations
2021-01-06 15:15:37 -08:00
Shane Harvey
ac07e0f4e2
PYTHON-2447 Fix race in CMAP maxConnecting test (#529) 2020-12-07 08:59:33 -10:00
Shane Harvey
d1fd3f7e98
PYTHON-2363 Rate limit new connection creations via maxConnecting (#511)
At most 2 connections can be in the pending state per connection pool.
The pending state covers all the work required to setup a new connection
including TCP, TLS, and MongoDB authentication. For example, if two
threads are currently creating connections, a third thread will wait for
either an existing connection to be checked back into the pool or for
one of the two threads to finish creating a connection.

The change reduces the likelihood of connection storms and improves the
driver's ability to reuse existing connections.
2020-11-23 15:55:54 -08:00
Shane Harvey
337a08c43d
PYTHON-2360 Ensure ConnectionCreatedEvents are emitted before ConnectionReadyEvents (#493)
Connections created in the background (for minPoolSize) are authenticated.
2020-10-06 11:37:27 -07:00
Shane Harvey
77913c7d36 PYTHON-1900 Add "connectionError" as a valid ConnectionCheckOutFailedEvent reason 2019-07-17 14:15:55 -07:00
Shane Harvey
0f30d16554 PYTHON-1873 Remove flawed CMAP fairness test
Print debug info when a CMAP test fails.
2019-06-27 18:45:21 -07:00
Shane Harvey
0400949ba5 PYTHON-1873 Increase waitQueueTimeoutMS in CMAP fairness test 2019-06-13 16:51:04 -07:00
Shane Harvey
f588412b67 PYTHON-1842 Implement Connection Monitoring and Pooling spec 2019-06-13 15:50:49 -07:00