The test waits until the TTL monitor starts deleting documents, and then right away checks that all documents have been deleted. Usually it will, because deleting a handful of documents takes so little time. Additionally, on MMAPv1 the exclusive lock will typically avoid access before the TTL thread completes. However a race exists. After talking with Kamran, the best solution seems to add another assert.soon.
- related to
-
SERVER-28154 Race condition in ttl_sharded.js
- Closed