[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:
Backports
Depends
is depended on by SERVER-25673 Remove ChunkManager use in the Migrat... Closed
Related
related to SERVER-25527 Send the version of the chunk being m... Closed
related to SERVER-27613 Remove unused 'chunkVersion' field se... Closed
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: SERVER-27510 remove chunk version check in moveChunk and splitChunk
Branch: v3.4
https://github.com/mongodb/mongo/commit/ebd851d55b58f83b8e2bdf27fd20540cc9285e7e

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: SERVER-27510 remove chunk version check in moveChunk and splitChunk
Branch: master
https://github.com/mongodb/mongo/commit/b9ecd13e8bee07dea88e908d8e8d2f12239f1879

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).

Generated at Thu Feb 08 04:15:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.