[SERVER-22797] Calls to ShardRegistry::reload needs to be serialized Created: 22/Feb/16 Updated: 25/Jan/17 Resolved: 25/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.3.2 |
| Fix Version/s: | 3.2.4, 3.3.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-only | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Completed: | |||||||||||||||||
| Sprint: | Sharding 11 (03/11/16) | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
Currently it is possible for multiple threads to call reload and we use the $replData lastVisibleOpTime to disregard older data: https://github.com/mongodb/mongo/blob/r3.2.0/src/mongo/s/client/shard_registry.cpp#L190-l195 The problem with this is that lastVisibleOpTime gives you the opTime that is guaranteed to include the data you just read. In other words, it is possible for the lastVisibleOpTime to be way newer than the data you read; which also means that it is possible for the returned shard list that was actually older than the currently stored one to have a newer lastVisibleOpTime and override the shard list. This will cause a momentary "shard not found" error until the next reload. |
| Comments |
| Comment by Githook User [ 25/Feb/16 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: (cherry picked from commit cf58ea6426f3bfb5dfbc21700c1c46d32a0bbecc) Conflicts: |
| Comment by Githook User [ 24/Feb/16 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |