Capturing Max's comment from the code review for easier future reference.
A couple minor comments. I also wanted to summarize some of the changes that
happened in patch set 13 and beyond in our future selves need to refer back to
this code review.
1. The concurrency_sharded*.yml test suites rely on the namespace for each FSM
workload being unique in order to avoid collection lifecycle issues. An initial
attempt at using the FSM workload's name as the database prefix was made, but it
was ultimately dropped in favor of using a global incrementing counter in
fsm_workload_test.py as the database name for certain FSM workloads grew beyond
64 characters otherwise.
https://github.com/mongodb/mongo/blob/b57eee5a295ede1fd67299dc9990c272c1f66ea...
2. The sharded_mergeChunks_partitioned.js, sharded_moveChunk_partitioned.js, and
sharded_splitChunk_partitioned.js FSM workloads implicitly assumed that there is
only data in the "config.chunks" collection for the collection associated with
the FSM workload that's executing. This assumption was violated by having
resmoke_runner.js not call the cleanupWorkloadData() function in order to have
data for resmoke.py to run the data consistency checks on. The FSM workloads and
the chunks.js helper were updated to plumb the "ns" field into the queries they
perform on the "config.chunks" collection to eliminate this assumption.
3. The concurrency_sharded_causal_consistency*.yml test suites use the
set_read_preference_secondary.js override in order to avoid using
readPreference=
Unknown macro: {mode}
for the "admin" and "config" databases in a
sharded cluster because we're running with a 1-node CSRS. However, changing
Mongo.prototype.runCommand() to inject a read preference now means that we're
using readPreference=
Unknown macro: {mode}
for the connections in the connection
cache when we had only been setting the read preference on the `db.getMongo()`
connection before. We can use the _DelegatingDriverSession object to share the
same session for different Mongo connection objects to ensure that we're reading
from a secondary only at a time after the effect of the sharding metadata
operations have been applied.