-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Cluster Scalability
-
ALL
-
0
-
3
Currently, the ShardRegistry is shut down twice on mongod, once in ShardingInitializationMongod if ShardingState is enabled and later always if the registry has been set on the Grid. The first call is before the service context has been set to interrupt all operation contexts, so if a request is hung from the ShardRegistry, e.g. waiting on replication for a config opTime, the registry can hang shutdown. This is only an indefinite hang for the config server, because it does not use a maxTimeMS when reading from itself, but a shard could still block shutdown until the maxTimeMS, which defaults to 90 seconds.
We should be able to fix this by only shutting down the ShardRegistry after interrupting operation contexts.