@@ -105,27 +105,33 @@ class ShardingReplicaSetChangeListener final : public ReplicaSetChangeNotifier::
105
105
LOG (2 ) << " Unable to schedule confirmed set update due to " << status;
106
106
return ;
107
107
}
108
- uassertStatusOK (status);
108
+ invariant (status);
109
109
110
- LOG (0 ) << " Updating config server with confirmed set " << connStr;
111
- Grid::get (serviceContext)->shardRegistry ()->updateReplSetHosts (connStr);
110
+ try {
111
+ LOG (0 ) << " Updating config server with confirmed set " << connStr;
112
+ Grid::get (serviceContext)->shardRegistry ()->updateReplSetHosts (connStr);
112
113
113
- if (MONGO_FAIL_POINT (failUpdateShardIdentityConfigString)) {
114
- return ;
115
- }
114
+ if (MONGO_FAIL_POINT (failUpdateShardIdentityConfigString)) {
115
+ return ;
116
+ }
116
117
117
- auto configsvrConnStr =
118
- Grid::get (serviceContext)->shardRegistry ()->getConfigServerConnectionString ();
118
+ auto configsvrConnStr = Grid::get (serviceContext)
119
+ ->shardRegistry ()
120
+ ->getConfigServerConnectionString ();
119
121
120
- // Only proceed if the notification is for the configsvr
121
- if (configsvrConnStr.getSetName () != connStr.getSetName ()) {
122
- return ;
123
- }
122
+ // Only proceed if the notification is for the configsvr
123
+ if (configsvrConnStr.getSetName () != connStr.getSetName ()) {
124
+ return ;
125
+ }
124
126
125
- ThreadClient tc (" updateShardIdentityConfigString" , serviceContext);
126
- auto opCtx = tc->makeOperationContext ();
127
+ ThreadClient tc (" updateShardIdentityConfigString" , serviceContext);
128
+ auto opCtx = tc->makeOperationContext ();
127
129
128
- ShardingInitializationMongoD::updateShardIdentityConfigString (opCtx.get (), connStr);
130
+ ShardingInitializationMongoD::updateShardIdentityConfigString (opCtx.get (),
131
+ connStr);
132
+ } catch (const ExceptionForCat<ErrorCategory::ShutdownError>& e) {
133
+ LOG (0 ) << " Unable to update config server due to " << e;
134
+ }
129
135
});
130
136
}
131
137
void onPossibleSet (const State& state) final {
0 commit comments