[SERVER-57060] Rename of a sharded collection must bump the collection version Created: 19/May/21 Updated: 29/Oct/23 Resolved: 17/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc3, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sergi Mateo Bellido | Assignee: | Pierlauro Sciarelli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-1965-Milestone-1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v5.0
|
||||||||||||||||||||||||||||||||||||
| Sprint: | Sharding EMEA 2021-05-31, Sharding EMEA 2021-06-28 | ||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||
| Description |
|
Not bumping the collection version is a problem for scenarios like:
Assuming that a router saw A and B before the rename, if this router tries to refresh its routing information about B after the rename, this refresh will hang forever. The underlying problem is that since we didn't bump the collection version, the router thinks that the routing info it has about B is more recent than the one it gets from the config server. Solution: We have to bump the collection version. The Collection Version of B after the rename should be newer than the one we had for B before the rename.
We are going to implement the second option. The goal of this ticket is to add a new configserver command that should be called when we commit the rename operation. This new command should do the work being done + bumping the version (i.e. changing the timestamp and the epoch of the collection). We should also take the _kChunkOpLock lock, so we disallow weirds interleavings of rename collections with merge/split chunks. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 21/Jun/21 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Githook User [ 17/Jun/21 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |