mongodb storage engine api question

69 views
Skip to first unread message

mongofan

unread,
Jun 7, 2016, 7:26:21 AM6/7/16
to mongodb-dev
Hi Everyone,
We are developing a storage engine for mongodb and we are now integrating the engine into mongodb using mongo storage engine api. For "point query" request, mongo storage engine api uses the way of "iterator" to implement. This has some negative impact on the performance. Anyone can help us figure out a way to directly support point query in the storage engine interface? rather than using iterator.
Thanks,

Andy Schwerin

unread,
Jun 7, 2016, 2:21:10 PM6/7/16
to mongodb-dev
Could you produce a specialization of iterator that can only return one document and is optimized for that behavior when you detect a point query?

--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev...@googlegroups.com.
To post to this group, send email to mongo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-dev.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

mongofan

unread,
Jun 7, 2016, 9:04:40 PM6/7/16
to mongodb-dev
Thanks Andy,
so how to detect whether the query is actually a point query from mongodb layer? For both unique index, and non-unique index in the storage engine.

Geert Bosch

unread,
Jun 7, 2016, 10:10:27 PM6/7/16
to mongo...@googlegroups.com

On Jun 7, 2016, at 21:04, mongofan <fuxi...@gmail.com> wrote:

so how to detect whether the query is actually a point query from mongodb layer? For both unique index, and non-unique index in the storage engine.


We'd call the seekExact method in the SortedDataInterface. 
While this should leave the cursor positioned according to the API, and thus next() might be called, I'm not sure we rely on that currently. It seems that the only caller of it is from the IndexAccessMethod::findSingle() method.

Regards,
  -Geert

mongofan

unread,
Jun 8, 2016, 4:37:26 AM6/8/16
to mongodb-dev
Thanks, Geert,
Is there query interface for the non-unique index in storage engine? Thanks,
Reply all
Reply to author
Forward
0 new messages