-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Service Arch
-
Fully Compatible
-
ALL
-
v8.0, v7.0
-
Workload Scheduling 2024-07-22
-
200
The FeatureFlagUtil JS library uses the "new Mongo(...)" syntax here to create a new connection to a mongod node.
This syntax bypasses any runCommand or other JS-overrides and attempts to create a connection using the DBClientRS/DBClientConnection C++ code to back the new Mongo object. It's possible that the C++ code encounters a network error when establishing the connection. If we're using the library in an environment where such network errors are expected and should be retried, like a suite doing step-downs or kill-primaries in the background, we need to retry on these network errors.
SERVER-91008 improved the situation here but the fix only works if we got an error back from the remote server before the connection is closed that we identify as retryable; this is because it expects there to be a code on the error. WE should additionally accomodate cases where we experience the network error 'locally' - that is, the underlying connection was closed before we got a response, and we get a network error from the OS.
This can be accomplished by using isRetryableError from utils.js, or using the overriden globalThis.connect here to make the new connection.
- is related to
-
SERVER-92445 FeatureFlagUtil JS library could use some clarifications
- Open
- related to
-
SERVER-89943 Feature flag util must retry upon errors in suites with stepdowns and kill primary
- Closed
-
SERVER-91008 The methods of feature_flag_utils.js should be resilient to ShutdownInProgress errors received from server nodes
- Closed