[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: |
|
||||||||||||||||
| 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 |