Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-92442

FeatureFlagUtil JS library functions can fail on network errors

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc16
    • 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.

            Assignee:
            george.wangensteen@mongodb.com George Wangensteen
            Reporter:
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: