[SERVER-56503] [sbe][query_fuzzer_standalone] SBE regex expression does not accept regex arguments Created: 29/Apr/21  Updated: 03/May/21  Resolved: 03/May/21

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

Type: Bug Priority: Major - P3
Reporter: Kyle Suarez Assignee: Martin Neupauer
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-52799 Make sbe the default execution engine... Closed
Duplicate
is duplicated by SERVER-56504 [sbe][query_fuzzer_sharded] SBE query... Closed
Operating System: ALL
Sprint: Query Execution 2021-05-17
Participants:

 Description   

In this task, note that the argument to $regexFind is a regex literal:

[js_test:query_fuzzer-2eaf33-1619674619344-0] Unexpected failure for command: {
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	"find" : "fuzzer_coll",
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	"filter" : {
[js_test:query_fuzzer-2eaf33-1619674619344-0] 		"$expr" : {
[js_test:query_fuzzer-2eaf33-1619674619344-0] 			"$regexFind" : {
[js_test:query_fuzzer-2eaf33-1619674619344-0] 				"input" : "$obj.obj.obj.str",
[js_test:query_fuzzer-2eaf33-1619674619344-0] 				"regex" : /^(?:Rustic Plastic Keyboar|fee)d|bluetooth/
[js_test:query_fuzzer-2eaf33-1619674619344-0] 			}
[js_test:query_fuzzer-2eaf33-1619674619344-0] 		}
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	},
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	"sort" : {
[js_test:query_fuzzer-2eaf33-1619674619344-0] 		"array" : 1,
[js_test:query_fuzzer-2eaf33-1619674619344-0] 		"_id" : 1
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	},
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	"limit" : NumberInt(13),
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	"projection" : {
[js_test:query_fuzzer-2eaf33-1619674619344-0] 		"sortKey" : {
[js_test:query_fuzzer-2eaf33-1619674619344-0] 			"$meta" : "sortKey"
[js_test:query_fuzzer-2eaf33-1619674619344-0] 		}
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	}
[js_test:query_fuzzer-2eaf33-1619674619344-0] }
[js_test:query_fuzzer-2eaf33-1619674619344-0] uncaught exception: Error: Find and aggregate commands failed with different errors: [null] != [Error: error: {
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	"ok" : 0,
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	"errmsg" : "PlanExecutor error during aggregation :: caused by :: $regexFind: input must be of type string",
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	"code" : 5073401,
[js_test:query_fuzzer-2eaf33-1619674619344-0] 	"codeName" : "Location5073401"
[js_test:query_fuzzer-2eaf33-1619674619344-0] }] :

The exact uassert being tripped is here: https://github.com/mongodb/mongo/blob/7fe73c9955e44c7e99c5c3487454bb2ad64740e1/src/mongo/db/query/sbe_stage_builder_expression.cpp#L3337-L3338



 Comments   
Comment by Martin Neupauer [ 03/May/21 ]

Yes, I have verified that by disabling the failpoint we get the same failure in the classic engine.

Comment by Anton Korshunov [ 30/Apr/21 ]

martin.neupauer Can you confirm this is a dup of SERVER-56504?

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