[SERVER-19183] Allow storage engines to provide optimized random cursors for use by $sample Created: 29/Jun/15  Updated: 19/Sep/15  Resolved: 08/Aug/15

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Storage, WiredTiger
Affects Version/s: None
Fix Version/s: 3.1.7

Type: Improvement Priority: Major - P3
Reporter: Charlie Swanson Assignee: Geert Bosch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on WT-2032 WT_CURSOR.next with random configurat... Closed
is depended on by SERVER-17688 Add wiredTiger support to return more... Closed
is depended on by SERVER-19182 Integrate storage engine optimization... Closed
Related
is related to SERVER-533 Aggregation stage to randomly sample ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Quint Iteration 7
Participants:

 Description   

The initial implementation of $sample will involve a collection scan if it is the first stage in the pipeline. This could be dramatically improved if we exposed a way for storage engines to provide a random cursor that would do something more efficient like a random walk on a B-Tree to get pseudo-random results.

This will only track the storage engine API and WiredTiger implementation of getRandomCursor(), work on integrating this into the aggregation pipeline will be tracked on SERVER-19182



 Comments   
Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'}

Message: SERVER-19183: Enable minimal randomness check now WT-2032 is fixed
Branch: master
https://github.com/mongodb/mongo/commit/eb9054134519cc62676febf7f44ca103fe0208be

Comment by Githook User [ 08/Aug/15 ]

Author:

{u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'}

Message: SERVER-19183: Allow storage engines to provide optimized random cursors for use by $sample
Branch: master
https://github.com/mongodb/mongo/commit/d7eb8b1f43dfa70cad97168a182ffdc01eaa1aeb

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