[SERVER-85172] Change stream tests make invalid assumptions about thread scheduling on the server Created: 12/Jan/24  Updated: 01/Feb/24

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: 7.3.0-rc0, 6.0.13, 5.0.24, 4.4.28, 7.0.6
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Mindaugas Malinauskas Assignee: Mindaugas Malinauskas
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Steps To Reproduce:

Add a pause of 1 second before https://github.com/10gen/mongo/blob/acdc463fe60bdc85aeced25297041b4051a0fc33/src/mongo/db/query/plan_executor_impl.cpp#L579 and execute jstests/noPassthrough/report_post_batch_resume_token_mongod.js in no_passthrough suite.
Also please see: https://jira.mongodb.org/browse/BF-30776.

Sprint: QE 2024-01-22
Participants:
Linked BF Score: 5

 Description   

Change stream tests make invalid assumptions about thread scheduling on the server, or, more precisely, about valid responses to getMore command on cursors on change stream cursors.
Actually, it is valid for the server to return zero results on a change stream cursor even if there are change events available at the moment. It can happen in case when the reading thread on the server does not get enough time allocated and the timeout on the change stream cursor (command "getMore") expires (1 second by default).
The test and the location that failed: https://github.com/10gen/mongo/blob/acdc463fe60bdc85aeced25297041b4051a0fc33/jstests/noPassthrough/report_post_batch_resume_token_mongod.js#L36.
Likely, one of the places where that assumption is made is at https://github.com/10gen/mongo/blob/acdc463fe60bdc85aeced25297041b4051a0fc33/src/mongo/shell/query.js#L845-L851.


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