[SERVER-57985] Remove RouterExecStage::ExecContext Created: 22/Jun/21  Updated: 29/Oct/23  Resolved: 12/Jul/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Bernard Gorman Assignee: Denis Grebennicov
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query Execution 2021-07-12, Query Execution 2021-07-26
Participants:

 Description   

On mongoS, we use the RouterExecStage::ExecContext enum to allow a tailable awaitData cursor to determine whether it should wait for further input. But on mongoD, we use the AwaitDataState struct to perform the same task. We already use part of this struct on mongoS to track how long we should wait for more input, but we do not currently use AwaitDataState::shouldWaitForInserts to signal to the execution machinery that we should wait in the first place. There does not seem to be any reason to keep RouterExecStage::ExecContext - which must be plumbed through the entire execution tree down to the BlockingResultsMerger - instead of just using AwaitDataState::shouldWaitForInserts in the same way as we do on mongoD.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 12/Jul/21 ]

Author:

{'name': 'Denis Grebennicov', 'email': 'denis.grebennicov@mongodb.com', 'username': 'denis631'}

Message: SERVER-57985 Remove RouterExecStage::ExecContext
Branch: master
https://github.com/mongodb/mongo/commit/77fb77fb8ef0139558787cb59d563bb75d3d94e1

Comment by Bernard Gorman [ 22/Jun/21 ]

The steps here would be something like:

  1. Set awaitDataState(opCtx).shouldWaitForInserts = true as well as setting awaitDataState(opCtx).waitForInsertsDeadline in this piece of code, in the same way that we do on mongoD.
  2. Similarly, switch shouldWaitForInserts to false when we get our first result on mongoS, the same as on mongoD.
  3. Have BlockingResultsMerger::awaitNextWithTimeout check awaitDataState(opCtx).shouldWaitForInserts instead of execCtx.
Generated at Thu Feb 08 05:43:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.