[SERVER-38632] allowDiskUse(true) does not work as expected Created: 14/Dec/18  Updated: 14/Dec/18  Resolved: 14/Dec/18

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

Type: Bug Priority: Major - P3
Reporter: Yin Ting Assignee: Kelsey Schubert
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-23980 $graphLookup should spill to disk if ... Backlog
Operating System: ALL
Participants:

 Description   

I use command like with following cmd:
db.books.aggregate([{$match: {'$and': [{'did': {'$in': ["85BA6D291638EBA514F7650740BF7059"]}}, {"pid" : {'$in':["38A062302D4411D28E71006008960167","0730F68F4B8B4B52AA23F0AAB46F3CA8"]}}]}}, {$graphLookup: {from: "books", startWith:"$depn",connectFromField:"depn",connectToField:"did",as:"uses", depthField:"depth", restrictSearchWithMatch: {"pid" : {'$in':["38A062302D4411D28E71006008960167","0730F68F4B8B4B52AA23F0AAB46F3CA8"] }}}},{'$unwind': {path: '$uses'}}, {'$group': {_id:

{id: '$uses.did', tp:'$uses.tp',pid: '$uses.pid',pFid: '$uses.pFid', depth: '$uses.depth'}

}}, {'$group': {_id: '$_id.depth', count:

{ $sum: 1 }

}}]) .allowDiskUse(true)
Though allowDiskUse(true) is used, but I still got error code =40099"errmsg" : "$graphLookup reached maximum memory consumption". (ps:The document that searched from is about 15mb's json data.), could someone tell how to leverage disk when the data is huge? There's an associated issue SERVER-38560 logged that $project could not used in each level's $graphlookup



 Comments   
Comment by Kelsey Schubert [ 14/Dec/18 ]

Hi tyin,

Thank you for the report. We are tracking this work in SERVER-23980. Please feel free to vote it and watch it for updates.

Kind regards,
Kelsey

Generated at Thu Feb 08 04:49:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.