-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
MongoDB exposes a random sampling operation, which is implemented using a WiredTiger random sampling cursor. There is a new project in MongoDB that aims to allow multiple collections to be grouped into a single WiredTiger table.
In order to keep using the random sampling cursor when multiple collections are stored in each table, we need to provide a method for constraining the range of values the cursor operates between.
A possible new API would be:
WT_CURSOR::range(WT_CURSOR *cursor, const char *config)
Where config is one of:
- start_range
- end_range
- clear_range
API usage would be:
s->open_cursor(s, "table:mytable", NULL, "next_random=true", &c); c->set_key(c, "blah"); c->range(c, "start_range=true"); c->set_key(c, "foo"); c->range(c, "end_range=true"); while (c->next(c) == 0) { /* Do stuff */ }
- is depended on by
-
SERVER-29113 Have WT grouped collections support random cursors
- Closed
- related to
-
SERVER-28743 Make all WT cursor uses of keys --groupCollections aware.
- Closed