-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.0-rc3
-
Component/s: Sharding
-
Labels:None
-
Sharding 2017-01-02
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.