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

mapReduce can no longer create an output collection in a sharded cluster (4.3.2)

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • 4.3.2
    • MapReduce
    • None
    • Query
    • ALL

    Description

      I noticed while working on PYTHON-2072 that mapReduce can no longer create a collection in a missing database:

      $ python3.8 PYTHON-2072.py
      Server version:  4.3.2-392-gd6cc8fa
      Is mongos?  True
      mapReduce out to missing database:
      {'ok': 0.0, 'errmsg': 'database missing not found', 'code': 26, 'codeName': 'NamespaceNotFound'}
      mapReduce out to missing collection:
      {'result': {'db': 'test', 'collection': 'missingcoll2'}, 'ok': 1.0}
      $ python3.8 PYTHON-2072.py
      Server version:  4.3.2-392-gd6cc8fa
      Is mongos?  False
      mapReduce out to missing database:
      {'result': {'db': 'missing', 'collection': 'missingcoll1'}, 'ok': 1.0}
      mapReduce out to missing collection:
      {'result': {'db': 'test', 'collection': 'missingcoll2'}, 'ok': 1.0}
      

      On 4.2 mapReduce can create the output collection regardless of if the database exists.

      Attachments

        Activity

          People

            backlog-server-query Backlog - Query Team (Inactive)
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: