[DOCS-11469] Ambiguity about Where the Merge Sort Occurs in a Sharded Cluster Created: 20/Mar/18 Updated: 29/Oct/23 Resolved: 02/Mar/21 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ravind Kumar (Inactive) | Assignee: | Andrew Feierabend (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Days since reply: | 1 year, 42 weeks, 6 days ago | ||||||||||||||||||||
| Story Points: | 0 | ||||||||||||||||||||
| Description |
|
The documentation states, in different places, that a merge sort occurs on the mongos, or on the Primary database of the collection. The documentation may need to be reconciled, or, if I'm misunderstanding what's being communicated, clarified. I believe that the mongos is the only shard that merge-sorts the results of a .find() query. Statements in favor of each:
I also note that the explanation references the $orderby option, which, according to the documentation, is deprecated as of 3.2. |
| Comments |
| Comment by Jess Mokrzecki [ 14/Apr/22 ] |
|
Fix Version updated for upstream SERVER-17737: |
| Comment by Kay Kim (Inactive) [ 23/Jun/20 ] |
|
Commits per Asya's pull request : Branch: master Branch: v4.2 Branch: v4.0
Branch: v3.6 https://github.com/mongodb/docs/commit/6c8d275ae82e7a9428ada0ef073e2e4ec608fbbb |
| Comment by Githook User [ 13/Nov/18 ] |
|
Author: {'name': 'ravind', 'email': 'ravind.kumar@10gen.com', 'username': 'rkumar-mongo'}Message: |
| Comment by Githook User [ 13/Nov/18 ] |
|
Author: {'name': 'ravind', 'email': 'ravind.kumar@10gen.com', 'username': 'rkumar-mongo'}Message: |
| Comment by Githook User [ 13/Nov/18 ] |
|
Author: {'name': 'ravind', 'email': 'ravind.kumar@10gen.com', 'username': 'rkumar-mongo'}Message: |
| Comment by Ravind Kumar (Inactive) [ 13/Nov/18 ] |
|
https://github.com/mongodb/docs/pull/3485 <- For the short term, I'm removing the paragraph until we've fully reviewed the information as provided by bernard.gorman . At that point we can create clear and concise documentation describing merge sort behavior. |
| Comment by Ravind Kumar (Inactive) [ 02/Oct/18 ] |
|
If you have bandwidth to handle next week, that would be ideal. If not, I'll find someone to handle. |
| Comment by Susan Kerschbaumer (Inactive) [ 02/Oct/18 ] |
|
ravind.kumar I somehow missed this ticket – I'm wondering if someone in server would be able to pick this up now? I could revisit next week if not. |
| Comment by Ravind Kumar (Inactive) [ 20/Mar/18 ] |
|
Hi sue.kerschbaumer! So the original work on 1) https://docs.mongodb.com/manual/core/sharded-cluster-query-router/#sorting Via David's commentary, the merge sort always occurs on the mongos for find operations. For aggregation operations, the merge-sort occurs on a random shard. 2) https://docs.mongodb.com/manual/core/sharded-cluster-query-router/#routing-and-results-process This paragraph also references the primary shard as responsible for merge sorting. |