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

Wait for latest operation to be committed on all config secondaries in sessions_collection_auto_healing.js

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • Sharding 2021-01-25
    • 10

    Description

      jstests/sharding/sessions_collection_auto_healing.js expects a mongos can write its in-memory logical sessions to the durable sessions collection after the collection is created by an earlier refresh run on the config server. As part of writing its sessions, the mongos first checks if the sessions collection exists by refreshing from the config server, which reads from config.collections with majority read concern and nearest read preference. This can fail to find a newly sharded collection if the read targets a stale secondary outside the majority that first committed the sharded collection.

      To guarantee the mongos refresh discovers the newly sharded collection, the test should wait for the latest operation on the config server primary to become committed on all secondaries by calling rs.awaitLastOpCommitted() on the config server before triggering this refresh on the mongos.

      Attachments

        Activity

          People

            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: