Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
3.4.1
-
None
-
ALL
-
Description
It seems that using $max or $min in the output option of a $bucketAuto aggregation step triggers a segmentation fault. I managed to reproduce this issue with version 3.4.1-ent, and this script (replace $max by $min, to have the same behaviour):
var d = db.getSiblingDB('test');
|
|
|
d.drop();
|
d.foo.insertMany([
|
{ number_of_employees: 10 },
|
{ number_of_employees: 50 },
|
{ number_of_employees: 1 },
|
{ number_of_employees: 100 },
|
{ number_of_employees: 101 },
|
{ number_of_employees: 150 },
|
{ number_of_employees: 9203 },
|
{ number_of_employees: 100 },
|
{ number_of_employees: 1212 }
|
]);
|
|
|
d.foo.aggregate([
|
{'$bucketAuto': {
|
'groupBy': '$number_of_employees',
|
'buckets': 3,
|
'output': { 'value': { '$max': '$number_of_employees' } }
|
}}
|
]);
|
Output:
2017-01-04T14:56:55.963+0100 E QUERY [main] Error: error doing query: failed: network error while attempting to run command 'aggregate' on host '127.0.0.1:27017' :
|
DB.prototype.runCommand@src/mongo/shell/db.js:132:1
|
DB.prototype.runReadCommand@src/mongo/shell/db.js:109:16
|
DBCollection.prototype._dbReadCommand@src/mongo/shell/collection.js:183:12
|
DBCollection.prototype.aggregate/doAgg<@src/mongo/shell/collection.js:1298:30
|
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1301:15
|
@(shell):1:1
|
The logs are attached to this ticket.
Attachments
Issue Links
- duplicates
-
SERVER-25535 Remove injectExpressionContext() methods from pipeline directory
-
- Closed
-