[SERVER-45629] server crashes whene mapReduce query with $ne Created: 17/Jan/20  Updated: 06/Dec/22  Resolved: 17/Jan/20

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

Type: Bug Priority: Major - P3
Reporter: Jakub Wozny Assignee: Backlog - Core Eng Program Management Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-45177 Not-equal ($ne) in query for mapReduc... Closed
Assigned Teams:
Program Management
Operating System: ALL
Participants:

 Description   

When I execute this script the server crashes:

use test_db;
db.test_col.insert({value: 1});
db.test_col.insert({value: 2});
 
var mapF =  function () { emit(this.value, {count: 1}) };
var reduceF = function(key, values) {
        var result = {count: 0};
        values.forEach(function(value) {
          result.count += value.count;
        });
        return result;
      };
 
db.test_col.mapReduce(
    mapF, reduceF,
    {
        query: { value: {$ne: 1}},
        out: "inline"
    }
    );

 



 Comments   
Comment by Carl Champain (Inactive) [ 17/Jan/20 ]

Hi jakub.wozny@gmail.com,

Thanks for the report.
This issue was actually worked on in SERVER-45177 and the fix will be in 4.2.3, so I'm going to close this ticket as a duplicate. You can watch SERVER-45177 for updates.

Kind regards,
Carl
 

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