[SERVER-27510] Compare only epochs instead of full chunk versions in CollectionMetadata::checkChunkIsValid() Created: 22/Dec/16 Updated: 05/Apr/17 Resolved: 10/Jan/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.4.1, 3.5.1 |
| Fix Version/s: | 3.4.2, 3.5.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | Esha Maharishi (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||||||||||||||
| Sprint: | Sharding 2017-01-02 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||
| Description |
|
The check on the shard that the chunk's version sent by the config is the same as what the shard sees is a little counter productive: we bump the version of a random chunk on the donor with every migration, so a chunk that hasn't even moved away and back might get rejected for a moveChunk or splitChunk. Instead, we should just compare the chunk's epochs to protect against moving a chunk on a collection that was dropped and recreated. |
| Comments |
| Comment by Githook User [ 10/Jan/17 ] |
|
Author: {u'username': u'EshaMaharishi', u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}Message: |
| Comment by Githook User [ 10/Jan/17 ] |
|
Author: {u'username': u'EshaMaharishi', u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}Message: |
| Comment by Esha Maharishi (Inactive) [ 06/Jan/17 ] |
|
Further note: The epochs are already compared from the shardVersion field, thus the entire check of comparing the chunkVersions can be removed (rather than changing the check to comparing only the chunkVersions' epochs). |