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

The op '$ne'  in map reduce query clause cause  mongod exit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL

      Description

       

      mongo version: mongodb-community MongoDB shell version v4.2.2

      example record:

       

      { "_id" : ObjectId("5ea938564e4df711684b6822"), "project_id" : 7733525 "code" : 938, "title" : "test title", "creator" : { "id" : 32, "login" : "23", "avatar_url" : "https://rescdnxx.com", "url" : "https://mlt.xxx.net/api/user/key/xxx", "html_url" : "https://mlt.coding.net/u/xxx", "name" : "xx", "name_pinyin" : "zrj|zhrj|zhanrongjun" }, "status" : "未开始", "assignee" : { "id" : 1141842, "login" : "ddd", "name" : "xx", "name_pinyin" : "zrj|zhrj|xx" }, "priority" : 1, "description" : "desc", "due_date" : 1583039999, "created_at" : NumberLong("1586526674427"), "updated_at" : NumberLong("1586526674427"), "action" : "created", "repo_id" : 7727525, "creator_id" : 1141842, "creator_name" : "xxx", "assignee_id" : 1141842, "assignee_name" : "xxx", "sender_id" : 1141842, "sender_name" : "xxx", "name" : "ml-ec-dev", "op_status" : "created" }
      

       

      To run command on mongo console or  use php code to run mapReduce

      the following code will make mongod exit.  The op '$ne'  in query clause cause  mongod exit. The exit message is like "DBClientConnection failed to receive message from 127.0.0.1:27017 - HostUnreachable: Connection close"

       

      db.runCommand( {
       mapReduce: "task",
       query:{'op_status':{'$ne':['created']}},
       map: function()
      { emit(1, this); }
      ,
      reduce: function(one, items)
      { prev={'_reduce___':1}
      return prev
       },
      out: { inline: 1 }
       } )
      

        Attachments

          Activity

            People

            Assignee:
            dmitry.agranat Dmitry Agranat
            Reporter:
            gaecomcn@gmail.com Gaecomcn Com
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: