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

Transaction may not apply correctly if namespace does not exist in tenant migrations

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Repl 2021-04-05

      Description

      While creating the tenant migrations transactions passthrough, I noticed that if a transaction contained a createCollection command and a few insert commands onto that collection, some of the inserts would fail to be applied on-disk. This seems to be because we allow the insert ops to be applied in different writer threads from the createCollection op. If the insert ops are applied first, they fail with a NamespaceNotFound error. However, the migration doesn't fail because we catch NamespaceNotFound errors and simply proceed with the applying the rest of the writer vector. The end result is that the insert ops simply aren't applied.

      One straightforward approach to resolve this would be to ensure that all applyOps operations in a transaction are serialized into the same writer vector.

        Attachments

          Activity

            People

            Assignee:
            xuerui.fa Xuerui Fa
            Reporter:
            xuerui.fa Xuerui Fa
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: