ShardRegistry reload inside onReplicationRollback can get stuck

XMLWordPrintableJSON

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

      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.

            Assignee:
            Matthew Saltz (Inactive)
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: