summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/sorted_data_interface.h
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2018-07-27 18:48:05 -0400
committerDavid Storch <david.storch@10gen.com>2018-07-31 12:53:51 -0400
commit21c25ecaaaabe6ad4d7e8a2eb261dad1e2eb90df (patch)
treee37b37b17c97923c73f55249ac2ac52b2d4c59e9 /src/mongo/db/storage/sorted_data_interface.h
parenta1b225bcf0e9791b14649df385b3f3f9710a98ab (diff)
downloadmongo-21c25ecaaaabe6ad4d7e8a2eb261dad1e2eb90df.tar.gz
SERVER-36153 Delete SortedDataInterface::newRandomCursor()
Only the MMAPv1 storage engine ever provided an implementation for this virtual method, and MMAPv1 has since been removed from the development branch.
Diffstat (limited to 'src/mongo/db/storage/sorted_data_interface.h')
-rw-r--r--src/mongo/db/storage/sorted_data_interface.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/mongo/db/storage/sorted_data_interface.h b/src/mongo/db/storage/sorted_data_interface.h
index 7dfcc8554f3..aa6d1e6e51d 100644
--- a/src/mongo/db/storage/sorted_data_interface.h
+++ b/src/mongo/db/storage/sorted_data_interface.h
@@ -363,24 +363,6 @@ public:
virtual std::unique_ptr<Cursor> newCursor(OperationContext* opCtx,
bool isForward = true) const = 0;
- /**
- * Constructs a cursor over an index that returns entries in a randomized order, and allows
- * storage engines to provide a more efficient way to randomly sample a collection than
- * MongoDB's default sampling methods, which are used when this method returns {}. Note if it is
- * possible to implement RecordStore::getRandomCursor(), that method is preferred, as it will
- * return the entire document, whereas this method will only return the index key and the
- * RecordId, requiring an extra lookup.
- *
- * This method may be implemented using a pseudo-random walk over B-trees or a similar approach.
- * Different cursors should return entries in a different order. Random cursors may return the
- * same entry more than once and, as a result, may return more entries than exist in the index.
- * Implementations should avoid obvious biases toward older, newer, larger smaller or other
- * specific classes of entries.
- */
- virtual std::unique_ptr<Cursor> newRandomCursor(OperationContext* opCtx) const {
- return {};
- }
-
//
// Index creation
//