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

add a forceReload method to ShardRegistry to encompass current if (!reload()) { reload() } pattern

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 3.4.0-rc3
    • Sharding
    • None
    • Sharding 2017-01-02

    Description

      If a reload is in progress from another thread when ShardRegistry::reload() is called, the later ShardRegistry::reload() joins the current one.

      Once the current reload completes, the later call returns false to indicate that it did not perform its own reload.

      This leads to using the pattern:

      if (!Grid::get(txn)->shardRegistry()->reload(txn)) {
          // If the first reload joined an existing one, call reload again to ensure the reload is fresh.
          Grid::get(txn)->shardRegistry()->reload(txn);
      }
      

      This pattern should be encompassed in a forceReload() method on the ShardRegistry.

      Attachments

        Activity

          People

            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: