[SERVER-36290] find command on unsharded collection through mongos returns too much data from mongod to mongos Created: 25/Jul/18  Updated: 29/Oct/23  Resolved: 03/Jan/20

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 3.2.0, 3.4.0, 3.6.0, 4.0.0
Fix Version/s: 4.3.2

Type: Improvement Priority: Major - P3
Reporter: Asya Kamsky Assignee: Eric Cox (Inactive)
Resolution: Fixed Votes: 0
Labels: qopt-team, query-44-grooming, storch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-41329 Improve skip performance in mongos wh... Closed
Problem/Incident
Related
related to SERVER-41329 Improve skip performance in mongos wh... Closed
Backwards Compatibility: Minor Change
Sprint: Query 2019-12-16, Query 2019-12-30, Query 2020-01-13
Participants:
Case:
Linked BF Score: 0

 Description   

It looks like when SERVER-19355 was implemented the logic for handling sort/skip/limit that gets sent to shards gets sent to primary shard for queries on unsharded collections as well.

This results in mongod returning more documents to mongos and mongos then applying the skip rather than mongod just returning only the required data to mongos (after applying the skip and limit).

Not sure if this is a bug or just a missed opportunity for optimization.



 Comments   
Comment by Githook User [ 03/Jan/20 ]

Author:

{'name': 'Eric Cox', 'email': 'eric.cox@mongodb.com', 'username': 'ericox'}

Message: SERVER-36290 find command on unsharded collection through mongos returns too much data from mongod to mongos
Branch: master
https://github.com/mongodb/mongo/commit/1793288e477d5db8f07b823039ed072100af9385

Generated at Thu Feb 08 04:42:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.