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

Mongos can incorrectly report WCE after a retry of WriteWithoutShardKeyWithID writes despite succeeding in second try

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • ALL
    • Cluster Scalability 2024-1-8, Cluster Scalability 2024-1-22

      Under PM-3190, as reported by kaitlin.mahar@mongodb.com verbatim:

      1. we have two shards, shardA and shardB, and send the write to them both
      2. shardA responds  {ok: 1, n:0, writeConcernError: {…}}  and we save that write concern error
      3. shardB responds with a StaleConfig error for the write.
      4. given the StaleConfig error, we consider the response we got from shardA in step 2 to be out of date/invalidated, and so we retarget all shards anew.
      5. after retargeting, say we get {{ {ok:1, n:1}

        }} back from shardA and {{

        {ok:1, n:0}

        }} back from shardB

      6. the final response, perhaps confusingly, is still going to contain the write concern error from step 2, even though we consider that write irrelevant at this point and ended up redoing it (and didn’t get a WC error the second time.)

       

            Assignee:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Reporter:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: