[05:34:19] <dstanek> is there a way to get pymongo to spit out the queries that it is running?
[08:04:59] <lyrae> Does a schema only need to be created once? If im connecting to the db from a webpage, should i create the schema outside of it? if i do it in the webpage, i'd have to check wether the schema exists or not each time, no?
[08:09:01] <lyrae> this was meant to be in mongoose. apologies
[10:07:55] <bitinn> hi all, we have got a write skew issue we have been thinking about ways to resolve, love to hear some inputs: http://stackoverflow.com/questions/20918396/mongodb-strategies-for-resolving-a-race-condition
[10:40:34] <kali> bitinn: what about $set with a version marker for optimistic locking ?
[10:45:21] <bitinn> @ppetermann, i just realize it's a mongodb distribution, not just a fork. it's worth a try, but we are probably more comfortable with updating data model comparing to changing to tokumx in production.
[10:46:13] <bitinn> i don't know how to direct reply to ppl on freenode webchat, sorry.
[10:47:16] <bitinn> @kali, maybe there is a doc or cookbook for this type of solution? i never heard of version marker strategy, not sure what it involved
[10:54:25] <bitinn> ppetermann: yep, while i admit having this sort of write skew is annoying, it's not service breaking, so arguing we need toku transaction for this particular 1 action would be difficult :)
[10:55:50] <ppetermann> toku has some other advantages as well, (also some huge disadvantages)
[10:58:24] <bitinn> kali: your solution sure is interesting, didn't realize we could filter on query
[11:00:31] <bitinn> i will keep the question unanswered for now, see if better idea comes up
[15:28:48] <OliverJAsh> i'm building a RESTful API on top of a MongoDB. i want to provide pagination for my API resources. would there be anything wrong with using the ID to paginate? i could query the database by saying "ID is less than" — as the ID is like a timestamp?
[15:39:51] <kali> OliverJAsh: nothing wrong at all. it's actualy better than skip and offset
[21:06:05] <OliverJAsh> is it okay to rely on ObjectIDs for $gt and $lt queries (for pagination)?
[21:06:53] <OliverJAsh> in theory it should work because of the first 4 bytes being a timestamp, but what about the rest of the ID? what if the document is on a different shard and created at the same time?? would it still be "less than"?
[21:36:08] <kali> OliverJAsh: two document created by two different process in the same second are not necessarily in order. that may affect order locally, but not be a problem for pagination