Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-82045

Make $merge inside a $lookup behave the same in replicaset and sharded cluster when db does not exists

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL

      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.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: