Details
-
Improvement
-
Resolution: Won't Fix
-
Major - P3
-
None
-
3.4.0-rc3
-
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.