[SERVER-45910] Router might target wrong shard on write operation for unsharded collection Created: 31/Jan/20 Updated: 29/Oct/23 Resolved: 08/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.6, 4.0.19 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Marcos José Grillo Ramirez | Assignee: | Blake Oler |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-csrs-stepdown-only, sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.0
|
||||||||
| Sprint: | Sharding 2020-04-20 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 14 | ||||||||
| Description |
|
Suppose we have 2 shards: shard0 and shard1 and 2 routers: router0 and router1. From router0 we create an unsharded collection making sure that the primary shard is shard0. If we issue a write operation from router1 to that same collection, it might be targeted to shard1, which will cause the insert operation to fail. Refer to the build failure comments for more information. |
| Comments |
| Comment by Githook User [ 13/May/20 ] |
|
Author: {'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}Message: (cherry picked from commit 912bce679aeb48503175f3ac1cb0a87f32f0463f) |
| Comment by Githook User [ 06/Apr/20 ] |
|
Author: {'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}Message: |
| Comment by Marcos José Grillo Ramirez [ 07/Feb/20 ] |
|
We could use 2 routers instead of 3 and issue the insert from the first router instead of the third |
| Comment by Esha Maharishi (Inactive) [ 07/Feb/20 ] |
|
marcos.grillo, is there a fix we could make to the test in earlier branches to prevent this failure from occurring on those branches? |
| Comment by Esha Maharishi (Inactive) [ 07/Feb/20 ] |
|
Note, this was fixed in 4.4 by PM-1051 |