[SERVER-27437] $graphLookup stage should use Documents instead of BSONObj in the visited set and cache Created: 15/Dec/16 Updated: 05/Apr/17 Resolved: 20/Jan/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Charlie Swanson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Query 2017-01-23, Query 2017-02-13 |
| Participants: |
| Description |
|
When $graphLookup was originally implemented, it used the DBDirectClient to issue queries into the foreign collection, which returned results in BSON. During Using BSON is likely slower due to the need to convert between the two formats (Document and BSONObj). We already pay the overhead to convert the results from the foreign collection into Documents (since they are wrapped in a Pipeline), so we shouldn't undo that work and put them back into BSON, only to end up putting them in the 'as' field again as Values (which will first convert the BSONObjs to Documents). |
| Comments |
| Comment by Githook User [ 20/Jan/17 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}Message: |
| Comment by Githook User [ 20/Jan/17 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}Message: |
| Comment by Githook User [ 20/Jan/17 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}Message: |