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

ShardRegistry reload inside onReplicationRollback can get stuck

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • v4.0
    • Sharding 2019-04-22, Sharding 2019-05-06, Sharding 2019-05-20
    • 23

    Description

      Repro scenario:
      1. Rollback occurred.
      2. Periodic shard registry reload tries to perform shard reload. It is done with majority readConcern and the latest configOpTime. However, since a rollback just occurred, configOpTime > lastAppliedOpTime, so the reload will block.
      3. Rollback finishes fixing the oplog and record store. Now calls the OpObserverImpl::onReplicationRollback.
      4. Rollback thread tries to call ShardRegistry reload, but since the periodic reload thread is in the middle of reload, it just tries to wait for it to finish. And this causes cyclic dependency since the opTime won't advance until the rollback thread finishes.

      Attachments

        Issue Links

          Activity

            People

              matthew.saltz@mongodb.com Matthew Saltz (Inactive)
              randolph@mongodb.com Randolph Tan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: