[SERVER-30484] make _configsvrSetFeatureCompatibilityVersion foward remaining maxTimeMS to shards Created: 02/Aug/17  Updated: 27/Oct/23  Resolved: 26/Sep/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.5.10
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-10-02
Participants:

 Description   

Since the default maxTimeMS is infinite, the config server should forward maxTimeMS (if one was specified in the requst) in its setFCV requests to shards.



 Comments   
Comment by Dianna Hohensee (Inactive) [ 26/Sep/17 ]

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.

Comment by Esha Maharishi (Inactive) [ 15/Sep/17 ]

also check what maxTimeMS mongos sends to the config server for _configsvrSetFeatureCompatibilityVersion (make sure it's not the 30 sec default; if it's infinite it's fine)

Generated at Thu Feb 08 04:23:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.