[SERVER-82045] Make $merge inside a $lookup behave the same in replicaset and sharded cluster when db does not exists Created: 10/Oct/23  Updated: 12/Dec/23

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

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: pm3278-m1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-75856 Support implicit database creation fo... In Code Review
Related
is related to SERVER-69836 mongos doesn't raise validation error... Closed
is related to SERVER-74998 Remove deprecated enable_sharding par... Closed
Assigned Teams:
Query Execution
Operating System: ALL
Participants:

 Description   

On replicaset if we send an aggreagation with a $merge inside a $lookup, the server will return a 51047 error code no matter if the database exists or not.

On the other hand, if the same query is processed by a router in a sharded cluster, the router will reply with a 51047 error code if the database already exists and instead will return status OK if the database doesn't exist.

To stress this code path, you can use this pre-existing test case and very how the behavior change if you drop the database before running the aggregation.



 Comments   
Comment by Mickey Winters [ 10/Nov/23 ]

pausing because of overlapping work in SERVER-75856

Comment by Colin Stolley [ 11/Oct/23 ]

tommaso.tocci@mongodb.com I think you are correct. This looks like a corner case that should have been covered under SERVER-69836 but sadly was not. Thank you for reporting it.

Comment by Tommaso Tocci [ 10/Oct/23 ]

CC colin.stolley@mongodb.com is this related to SERVER-69836 ?

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