[SERVER-71372] getMore fails to return partial results from find on sharded cluster Created: 15/Nov/22  Updated: 29/Oct/23  Resolved: 16/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc2, 6.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Steve Tarzia Assignee: Steve Tarzia
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-57469 Return partial results from subset of... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.2
Steps To Reproduce:

BF-26792 and BF-26937 reproduce this sporadically.

To reproduce locally, run jstests/sharding/allow_partial_results_with_maxTimeMS.js repeatedly in a loop until failure. It should fail within about ten runs (10-20 minutes).  To reproduce more readily, change the js test's getMoreBatchSize constant to an odd number, like 47.

Sprint: QE 2022-11-28
Participants:
Linked BF Score: 154

 Description   

When running a getMore command on a find cursor on a sharded cluster, with the allowPartialResults and maxTimeMS parameters set, we sometimes return a maxTimeMSExpired error even when partial results are available from at least one shard.

This is related to the functionality introduced in SERVER-57469.

In these cases, a call to ClusterClientCursorImpl::partialResultsReturned() is unexpectedly returning false because the ClusterClientCursorImpl::next() does not set _maxTimeMSExpired in a case when the BlockingResultsMerger can return a MaxTimeMSExpired error.



 Comments   
Comment by Githook User [ 16/Nov/22 ]

Author:

{'name': 'Steve Tarzia', 'email': 'steve.tarzia@mongodb.com', 'username': 'starzia'}

Message: SERVER-71372 fix getMore of partial results from find on sharded cluster
Branch: v6.2
https://github.com/mongodb/mongo/commit/29296c1ed9d000f761d908e1c32363acb0802568

Comment by Githook User [ 15/Nov/22 ]

Author:

{'name': 'Steve Tarzia', 'email': 'steve.tarzia@mongodb.com', 'username': 'starzia'}

Message: SERVER-71372 fix getMore of partial results from find on sharded cluster
Branch: master
https://github.com/mongodb/mongo/commit/ae246015f40339ba3a0a0898a233f3085129942e

Generated at Thu Feb 08 06:18:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.