[SERVER-38064] Pipeline::dispose() should not check for stale databaseVersion Created: 09/Nov/18  Updated: 27/Oct/23  Resolved: 05/Feb/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: David Storch Assignee: Backlog - Query Team (Inactive)
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-38063 executionStats or allPlansExecution l... Closed
is related to SERVER-37455 Take CursorManager out of Collection Closed
Assigned Teams:
Query
Operating System: ALL
Participants:
Linked BF Score: 17

 Description   

As part of cleaning up the execution machinery for an aggregation cursor, Pipeline::dispose() must be called before calling the Pipeline destructor. For exception safety, we use a std::unique_ptr Deleter to ensure that Pipeline::dispose() is called whenever an error occurs.

This implies Pipeline::dispose() cannot throw, since it may be called when an exception is already active. However, DocumentSourceCursor::doDispose() constructs an AutoGetDb. AutoGetDb can throw an exception on construction due to stale databaseVersion. Since we don't attach a databaseVersion for aggregate commands, we have only ever observed this scenario for explain of an aggregate command. Still, skipping the stale databaseVersion check in the disposal process would ensure that we never run into a double-exception bug.



 Comments   
Comment by David Storch [ 05/Feb/19 ]

The problematic construction of an AutoGetDb was removed by 84b142d512 under SERVER-37455. Therefore, this issue is no longer present in the master branch. I'm resolving this ticket as "Gone Away".

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