[SERVER-38472] A config server can return early for a shardCollection command even if the shard hasn't finished its own shardCollection command Created: 07/Dec/18 Updated: 29/Oct/23 Resolved: 02/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.0.4, 4.1.6 |
| Fix Version/s: | 4.0.6, 4.1.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Blake Oler | Assignee: | Janna Golden |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | 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 2018-12-31, Sharding 2019-01-14 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 71 | ||||||||
| Description |
A config server should not be able to early return if the shard's shardCollection command is not complete. |
| Comments |
| Comment by Githook User [ 08/Jan/19 ] |
|
Author: {'username': 'jannaerin', 'email': 'golden.janna@gmail.com', 'name': 'jannaerin'}Message: (cherry picked from commit c3e78c91c3a86fd6aba44a0b3c97062f55512f56) |
| Comment by Githook User [ 02/Jan/19 ] |
|
Author: {'username': 'jannaerin', 'email': 'golden.janna@gmail.com', 'name': 'jannaerin'}Message: |
| Comment by Janna Golden [ 14/Dec/18 ] |
|
BF-11523 has similar behavior, except after step #7, we then drop the collection and database while _shardsvrShardCollection is still running. This is possible because the config has released the distributed locks. Mongos then later sends an entirely new shardCollection request for the same collection, the config server sends _shardsvrShardCollection to the primary shard. This new request "joins" the original request, and then both return with the error "Collection was successfully written as sharded but got dropped before it could be evenly distributed". |