[SERVER-23341] Replace ShardRegistry::reload() method with swap() Created: 24/Mar/16 Updated: 06/Jun/16 Resolved: 18/May/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Misha Tyulenev | Assignee: | Misha Tyulenev |
| Resolution: | Done | Votes: | 0 |
| Labels: | ShardRegistry | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Sharding 14 (05/13/16), Sharding 15 (06/03/16) |
| Participants: |
| Description |
|
ShardRegistry::reload() is called in many places and internally it performs a call to CatalogManager::getAllShards() and then rebuilds all internal maps. To encapsulate the reload functionality: 2) Provide a helper method (pseudocode)
3) replace calls to ShardRegistry::getShard() with the new method 4) Add a class ShardRegistryUpdater
Protect the calls with a lock to serialize the reload order. 5) In place of reload() use
|
| Comments |
| Comment by Githook User [ 19/May/16 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: |
| Comment by Githook User [ 18/May/16 ] |
|
Author: {u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}Message: |
| Comment by Randolph Tan [ 24/Mar/16 ] |
|
We have to be careful on using which criteria to determine which one is newer as we currently don't have a good one right now. Note: it is not correct to use last visible opTime from the config server. Also see |