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

Ensure setUp writes in `safe_secondary_reads_single_migration_suspend_range_deletion.js` get propagated to the shard secondary

    • Fully Compatible
    • ALL
    • v4.0, v3.6
    • Sharding 2018-09-24
    • 0

      From investigating a build failure, I concluded that it is possible that write done in safe_secondary_reads_single_migration_suspend_range_deletion.js might not have propagated to the secondary node.

      Specifically, my hypothesis is that:

      1. The setUp here succeeded on a shard's primary node
      2. That write did not replicate yet to the secondary
      3. The read from aggregate went against the secondary node of the shard and did not find the document.

      I have no way of proving that through the logs, but instead I want to make all setUp writes, like the one here use {w:2} write concern in order to ensure both nodes get the document before proceeding with the rest of the test.

      Another more generic solution could be to call awaitReplication after the setUp call here in order to ensure all existing and future tests will wait.

            kaloian.manassiev@mongodb.com Kaloian Manassiev
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            0 Vote for this issue
            2 Start watching this issue