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

Disallow createIndexes and createCollection from running inside transactions that explicitly specify non-local readConcern

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4.0-rc0, 4.7.0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Sprint:
      Execution Team 2020-03-23, Execution Team 2020-04-06

      Description

      The test concurrent_drops_and_creates.js can be modified to create a scenario where createIndexes and createCollection can fail with the following message:

      "Command create does not support { readConcern: { level: \"snapshot\", provenance: \"clientSupplied\" } } :: caused by :: read concern not supported",

      This failure occurs if concurrent_drops_and_creates.js explicitly creates a collection or an index inside this transaction (instead of the highlighted lines), and is run inside sharded_jscore_txns.

      I spun up a ShardingTest locally and attempted the same sequence of events as this test, but I did not run into the error, which leads me to believe something about the testing configuration results in readConcern getting explicitly forwarded to the cluster create and cluster createIndexes commands.

      Note that this error does not occur when running the same test (with the above modification) in replica_sets_jscore_passthrough.

      As an update, it looks like in order to reproduce this error, createCollection/createIndexes needs to be run after another operation inside a transaction. If either is the first operation inside the transaction, the error does not occur.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              maria.vankeulen Maria van Keulen
              Reporter:
              maria.vankeulen Maria van Keulen
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: