|
So the cluster (router/mongos) setFeatureCompatibilityVersion command and the config server setFeatureCompatibilityVersion command both use Shard:: runCommandWithFixedRetryAttempts, which sets a Milliseconds::max() timeout (effectively infinity, see here,
here, here) default and then passes the parameters into ShardRemote::_runCommand. ShardRemote::_runCommand then uses the min timeout of the the max time millis passed in and the max time millis set on the opCtx. So the default is already infinity if maxTimeMillis is unset.
The user's maxTimeMillis, if specified, therefore depends on the common high level mongos/mongod command code to set it appropriately on the opCtx for every incoming command in order for it to correctly propagate across servers. The mongod command parses and sets it here before calling the particular command code, so the mongod is safe. The mongos common command code calls into the legacy strategy.h/cpp code here. strategy.h/cpp then parses maxTimeMS and sets it on the opCtx similarly.
Confirmed that this is already implemented, so closing.
|