When deleting the donor range after migrating a chunk off of a shard,
the range deleter will schedule the deletion at some time in the future,
according to a server parameter orphanCleanupDelaySecs, which defaults
to 900, or 15 minutes. It does not delay range deletions preparatory to
migrating a range in, and does not put off deleting the donor range if
the moveChunk command has set the option _waitForDelete.
The file jstests/sharding/write_commands_sharding_state.js had CR (0x0D)
line endings, which made the patch fail lint. The substantive changes
in the file were to add "_waitForDelete" options to the moveChunk
commands.
This is just a cleanup work to hide some of the private state of
ReplSetTest so it is easier to encapsulate and add new logic. Also enables
strict mode.
With this change all legacy-style (non-NetworkInterface) communication
from mongos to shard mongod is going through ShardConnection and will
always end the shard initialization data at connection establishment.