[SERVER-18955] mongoS doesn't set batch size (and keeps the old one, 0) on getMore if performed on first _cursor->more() Created: 12/Jun/15 Updated: 03/Jan/18 Resolved: 30/Jun/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.6.10, 3.0.3, 3.1.4 |
| Fix Version/s: | 2.6.11, 3.0.5, 3.1.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Page | Assignee: | Charlie Page |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Completed: | |||||||||||||
| Sprint: | Sharding 6 07/17/15 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| Description |
|
mongos in cursors.cpp only sets batch size (and always sets batch size) after a document is returned. This leads to the batch size being set to 0 every time a full load of ntoreturn documents are sent back to the client. If the cursor is exhausted at that point, then the next getMore request to the mongoD (which will be sent on the next will request to the mongoS) will have a batch size of 0. This returns all results and can lead to cursors timing out. Moving the setBatchSize before the loop starts and after all breaks (so no useless work is performed setting an invalid batch size on break) should fix this. |
| Comments |
| Comment by Githook User [ 01/Jul/15 ] |
|
Author: {u'username': u'lissom', u'name': u'charlie.page@gmail.com', u'email': u'charlie.page@gmail.com'}Message: comment update Signed-off-by: Randolph Tan <randolph@10gen.com> Conflicts: (cherry picked from commit 61349d3c00c5a6a4fecfcd12f528574d25ba1bf1) |
| Comment by Githook User [ 01/Jul/15 ] |
|
Author: {u'username': u'lissom', u'name': u'charlie.page@gmail.com', u'email': u'charlie.page@gmail.com'}Message: comment update Signed-off-by: Randolph Tan <randolph@10gen.com> Conflicts: |
| Comment by Githook User [ 30/Jun/15 ] |
|
Author: {u'username': u'lissom', u'name': u'charlie.page@gmail.com', u'email': u'charlie.page@gmail.com'}Message: comment update Signed-off-by: Randolph Tan <randolph@10gen.com> |
| Comment by Randolph Tan [ 17/Jun/15 ] |
|
Note: the key to reproducing this issue is to make sure that the mongos will open cursors to multiple shards. |