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

CollectionRoutingInfoTargeter should not be notified of errors on a different namespace

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Catalog and Routing
    • 2

      When performing a batch write and a routing or collection creation error is encountered, the entire batch is cancelled because we know that all subsequent writes will also fail with the same error. This error is then duplicated to fill the responses of all the writes that were not attempted. We then update errorsPerNamespace using the namespace of the write and the error we just duplicated.

      In the case that there are writes to multiple namespaces in the bulk write, this may result in an error for one namespace being added to errorsPerNamespace for another namespace. This then causes the bulk write executor to note error responses on targeters of namespaces that didn't actually have an error response.

      The collection routing info targeter should not have to be responsible for checking if the error it is being notified belongs to the correct namespace - this should be handled by the bulk write executor.

      One possibility would be to leave the error duplication so that the write operations are correctly marked for retry but to not add these errors to errorsPerNamespace if they do not actually match the namespace.

            Assignee:
            backlog-server-catalog-and-routing [DO NOT USE] Backlog - Catalog and Routing
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: