[SERVER-85503] Add an open()-like API to DocumentSources to do non-parsing validation Created: 19/Jan/24  Updated: 25/Jan/24

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

Type: Task Priority: Major - P3
Reporter: Memento Slack Bot Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 0
Labels: qi-tech-debt, query-skunkworks
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-79508 Investigate removing StubMongoProcess... Backlog
is related to SERVER-83531 $backupCursor fails to re-parse Closed
is related to SERVER-85374 Analyze command is not reparseable Closed
Assigned Teams:
Query Integration
Participants:

 Description   

There's been a couple examples (linked to this ticket) of DocumentSources having validation code inside their parsers which isn't really about parsing. This makes it hard to build an AST that you don't intend to execute, as we did in query stats.

The SBE system has the concept of calling "open" before you call "getNext", and I think this would be a good paradigm to solve this problem. There are already many stages with a sort of "bool _initialized" tracking stuff to do on the first call to getNext().



 Comments   
Comment by Alyssa Clark [ 25/Jan/24 ]

Once we do this, we should look into whether we can remove some of the checks for the StubMongoProcessInterface (see SERVER-79508) that we had to add because validation was being done at parse time rather than execution time.

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