[SERVER-55448] MQLRUN crashes on $merge stage Created: 23/Mar/21  Updated: 06/Dec/22  Resolved: 10/Aug/22

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

Type: Bug Priority: Major - P3
Reporter: David Golub Assignee: Backlog - Query Execution
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Operating System: ALL
Participants:

 Description   

Problem Statement/Rationale

This is a description of the current state of things why we need to do this work.
MQLRUN crashes if it is passed a $merge stage. For example,

D:\Code\mongohouse>artifacts\mqlrun -e "[{ $merge: { into: 'foo' } }]" -j D:\out.bson
{"t":{"$date":"2021-03-23T15:24:31.567Z"},"s":"F",  "c":"-",        "id":23079,   "ctx":"main","msg":"Invariant failure","attr":{"expr":"Hit a MONGO_UNREACHABLE!","file":"C:\\data\\mci\\baa2519902cb0fcd2e153c9c7bcf9243\\src\\src\\mongo/db/pipeline/process_interface/stub_mongo_process_interface.h","line":82}}
{"t":{"$date":"2021-03-23T15:24:31.568Z"},"s":"F",  "c":"-",        "id":23080,   "ctx":"main","msg":"\n\n***aborting after invariant() failure\n\n"}

Proposed Change/Action

This is a brief description of the task to be completed.
We should return a useful error message if $merge is included in the pipeline. Right, now the error is being written to stdout, which ADL attempts to read as BSON and determines to be invalid, leading to a completely unhelpful error. If the error were written to stderr instead, it would be treated as an error by ADL.

Additional Notes

Any additional information that may be useful to include.



 Comments   
Comment by Kyle Suarez [ 10/Aug/22 ]

We're going to close this issue as Won't Fix, but feel free to reopen it if you think the fix should be scheduled.

Comment by David Golub [ 09/Aug/22 ]

I'd guess not, since we have a fix in place on our side to deal with the issue in the short term, and switching to mongoc will eliminate the issue in the long term.

craig.wilson@mongodb.com jenny.ma@mongodb.com adinoyi.omuya@mongodb.com Please feel free to chime in if you disagree here.

Comment by Brenda Rodriguez [ 09/Aug/22 ]

david.golub@mongodb.com, is this work still needed given that there is a project to replace MQL Run?

Comment by Ana Meza [ 05/Aug/22 ]

Pushing back to TriageĀ 

Comment by Kyle Suarez [ 30/Mar/21 ]

david.golub, we're adding this to our Query Execution Quick Wins bucket. If your team would like this addressed with a higher priority please reach out to QE.

Generated at Thu Feb 08 05:36:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.