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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.4.0-rc3
    • Component/s: Sharding
    • None
    • Sharding 2017-01-02
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Esha Maharishi (Inactive)
            Reporter:
            Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: