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

appendMajorityWriteConcern should only override wtimeout if it is non-zero

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc11
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • ALL
    • v8.0
    • Programmability 2024-05-27

      wtimeout of zero has a special meaning that it's no timeout. So, logically it has a greater value than anything, but we use numerical comparisons in the places below:

      https://github.com/10gen/mongo/blob/231d6367ea3c7670a458ce00252d970979d7f5be/src/mongo/executor/async_rpc_util.h#L74
      https://github.com/10gen/mongo/blob/231d6367ea3c7670a458ce00252d970979d7f5be/src/mongo/db/commands.cpp#L509

      So, it ends up being treated as a smaller number. As a result, a no timeout setting can be overwritten with a smaller timeout.

            Assignee:
            ronald.steinke@mongodb.com Ronald Steinke
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: