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

Mongos should preserve error labels for write ops

    XMLWordPrintable

Details

    • Fully Compatible
    • Sharding 2018-09-10, Sharding 2018-09-24, Sharding 2018-10-08

    Description

      Mongos batches writes together and even if individual writes fail, the command response can return {ok: 1}. However, if any of the individual writes failed with an error label, that label will be lost.

      The batch write path should be modified to preserve any error labels returned by writes in a batch.

      This ticket includes determining how error labels encountered during batch writes should be handled, e.g. if two writes in an unordered batch fail but only one has the TransientTransactionError label, should the batch response include the label or not. Mongod addresses this by throwing if any statement in a batch fails within a transaction, so the solution may be adding this behavior to mongos.

      This work was spun off fromĀ SERVER-35708.

      Attachments

        Issue Links

          Activity

            People

              randolph@mongodb.com Randolph Tan
              jack.mulrow@mongodb.com Jack Mulrow
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: