So, this is my query, being performed using the legacy driver for node.
files.aggregate([ {
$match : {
filename : {
$in : name
}
}
}, {
$group : {
_id : '$onDisk',
ids : {
$push : '$_id'
}
}
And my issue is, if the amount of documents matched exceeds a little over 500 , the group stage is completely skipped and I get an array of matched documents that contain just the _id. I do not get an error about maximum size for bson exceeded, the aggregation simply returns me what it has before the group stage. I can’t tell if this issue is on the driver or mongo itself. The mongod version is 6 and legacy driver is 5.0.0, with the mongodb driver being 5.9.2.
I don’t know if it’s relevant, but ‘onDisk’ can be null, and it was when it failed, I can’t tell if it failed with large amounts an non-null values for onDisk.