[SERVER-44892] getShardDistribution should use $collStats agg stage instead of collStats command Created: 02/Dec/19 Updated: 29/Oct/23 Resolved: 17/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding, Shell |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.6, 4.4.0-rc0, 4.0.18, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alex Bevilacqua | Assignee: | Tommaso Tocci |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, sharding-4.4-stabilization, sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v4.4, v4.2, v4.0
|
||||||||||||||||||||
| Sprint: | Sharding 2020-03-23 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||
| Description |
|
See https://gist.github.com/alexbevi/dc51c0ce4820f46e46feca06dbdc64bb for repro details. As getShardDistribution relies on the results of the collStats command, if the underlying command fails getShardDistribution can incorrectly report that the "Collection is not sharded". This command should use the $collStats agg stage to prevent the problem described in |
| Comments |
| Comment by Githook User [ 30/Mar/20 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: (cherry picked from commit eae89bb9aa53a7b3a7164d971be8e8be991d33a2) |
| Comment by Githook User [ 30/Mar/20 ] |
|
Author: {'name': 'Tommaso Tocci', 'username': 'toto-dev', 'email': 'tommaso.tocci@mongodb.com'}Message: (cherry picked from commit 67a6dee604b91e759d30d97d72b0cb9ddbdd06f8) |
| Comment by Githook User [ 25/Mar/20 ] |
|
Author: {'name': 'Tommaso Tocci', 'username': 'toto-dev', 'email': 'tommaso.tocci@mongodb.com'}Message: (cherry picked from commit 2563d9862806d35e4d9964bbefd5b79fd5a79c91) |
| Comment by Githook User [ 17/Mar/20 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: |
| Comment by Charlie Swanson [ 20/Dec/19 ] |
|
I'm re-opening this request because the query team isn't planning on changing anything about the collStats command, and I think the fix is for getShardDistribution to use the $collStats agg stage instead. I will re-title the ticket as such. |
| Comment by Carl Champain (Inactive) [ 02/Dec/19 ] |
|
Hi alex.bevilacqua, This appears to be a duplicate of |