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

ShardServerProcessInterface's rename must synchronize with DDL operations

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: 5.1.0, 5.0.3
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • v5.0

      ShardServerProcessInterface::renameIfOptionsAndIndexesHaveNotChanged is totally bypassing the DDL coordinator infrastructure and is currently only used for the $out stage.

      Such stage requires a collection parameter and works as follows:

      1. User issues an aggregation including an $out stage with output collection db.outColl
      2. During the aggregation, documents are written to a temporary collection db.tmp.coll
      3. At the end of the aggregation, the temporary collection is renamed to db.coll by calling renameIfOptionsAndIndexesHaveNotChanged.

      As a result, if any DDL is invoked on db.coll concurrently with the rename happening at point (3), both local and sharding catalog can end up in an inconsistent state.

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: