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

mongos doesn't honor a failpoint's full blockTimeMS

    • Server Programmability
    • SP Prioritized List

      The behavior of MaxTimeMSExpired differs between mongod and mongos when using a blocking failpoint:

      • mongod: Returns MaxTimeMSExpired after max(blockTimeMS, maxTimeMS).
      • mongos: Returns MaxTimeMSExpired after maxTimeMS only.

      Repro: https://gist.github.com/prestonvasquez/d4b8193b4f67750994051ca61d8f035a

      results for mongos:

      2024/10/29 16:48:58 expected failpoint to block for 1 second, but blocked for 63.76625ms
      exit status 1
      

      results for mongod:

      2024/10/29 16:51:25 passed
      

      Failpoints should be uniform across topologies, behaving as mongod does. In particular, (for sharded clusters) drivers are currently unable to use failpoints to test CSOT behavior that attempts to continue reading a server response after a timeout.

      Consider adding a toggle for this behavior:

      {
          "configureFailPoint": "failCommand",
          "mode": {"times": 1},
          "data": {"failCommands": ["insert"], "blockConnection": True, "blockTimeMS": 1000, "overrideMaxTimeMS": True},
      }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            preston.vasquez@mongodb.com Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: