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

cloneDb.js should awaitReplication after creating view on collection

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.5.11
    • None
    • Replication
    • None
    • Fully Compatible
    • ALL
    • 0

    Description

      The jstests/replsets/cloneDb.js test uses a 3-node replica set and a standalone mongod. It first inserts some documents on the primary of the replica set, and then creates a collection view on the primary. The documents on the primary are inserted with writeConcern=3, but the creation of the collection view is executed without a writeConcern. This means that, when the test clones the database from the SECONDARY to the standalone node, the view might not have actually replicated to the SECONDARY. The standalone node would then fail to clone the view, which causes the test to fail when it checks the view document count. We should await replication after creating the view on the primary to ensure it actually replicates to the SECONDARY before doing the database clones.

      Attachments

        Activity

          People

            william.schultz@mongodb.com William Schultz (Inactive)
            william.schultz@mongodb.com William Schultz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: