[SERVER-36738] BlockingResultsMergerTest incorrectly configures blocking next call Created: 17/Aug/18  Updated: 29/Oct/23  Resolved: 21/Aug/18

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Querying, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.1.3

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2018-08-27
Participants:
Linked BF Score: 17

 Description   

This test is attempting to verify that a blocking call to BlockingResultsMerger::next() can be interrupted via the OperationContext. This test was adapted from this test during SERVER-33323, but mistakenly changed the configuration so that the cursor was tailable and awaitData. Now that the cursor is tailable and awaitData, the call to next() is actually going into this code path which reads the awaitDataState off the OperationContext. This state has not been configured by the test, so the Date_t that is part of that struct will be default-constructed to the unix epoch. This means that the thread waiting for the event can be woken up immediately. On a tailable and awaitData cursor this is not an error and causes the call to next() to return EOF with an OK status.

This causes this assertion to fail. As a result, the BlockingResultsMerger is destroyed upon exit, but has not yet cleaned up all of the remote cursors, so further triggers this invariant.



 Comments   
Comment by Githook User [ 21/Aug/18 ]

Author:

{'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}

Message: SERVER-36738 Block without timeout when test expects to block.
Branch: master
https://github.com/mongodb/mongo/commit/853cb4d0b54353bb835b27f6332cbb3ad8f5cb3f

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