We have occasionally seen failures in oplog_sampling.js where the oplog stones logic at startup chooses the scanning method over the sampling option for the oplog stones. This has been attributed to an incorrect size storer/fast count persisted for the oplog collection at shutdown despite having inserted enough documents to trigger the sampling logic.
To help diagnose future occurence of this test failure, we can make the test failure earlier by detecting the incorrect fast count before shutdown rather than let the test proceed to the restart stage where the fast count would be corrected by the oplog scanning logic.
This would have the benefit of. preserving more of the server state with the incorrect counts.