After an upgrade of a sharded cluster, the MongoS' connections to the newly-restarted MongoDs are stale. If subsequent operations are performed before the stale connections are flushed from the pool, then the operations can fail.
The attached test case works because it sleeps for 5 seconds after the upgrade (allowing some stale connections to be reaped), and then retries connecting to run its count() operation. If the retry wrapper (the assert.soon()) is removed, the count() fails because the first connection it uses is still stale.
- duplicates
-
SERVER-11982 connection error when doing sharded cluster upgrade following recommended procedure
- Closed