[09:24:23] <robertjpayne> Looks like Mongoid in ruby doesn't do any sort of checks or limitations so what I'm doing I believe is prone to a javascript function pass which could be used to DoS the db
[09:26:21] <kali> robertjpayne: well, you'll need your web script to allow quite complex modification of the query document for that
[09:29:55] <robertjpayne> kali: if javascript is disabled though then the risk is (mostly) gone no? the OP_CODE will always be a read so I can't see a risk as the query would be broken
[09:32:40] <kali> robertjpayne: same if you make sure nothing allow to build something like: <foo> : { $where : <bar> }
[09:33:11] <kali> even in that case, i think the db object is now unaccessible from the $where context (since 2.4, i iirc) so the risk is non existent
[09:34:19] <robertjpayne> kali: sounds good, yea my user input is validated as a valid JSON structure and goes directly to the driver as such ( not a string ), the values inside the JSON can be strings though and that's where I'm looking for vulnerabilities at the moment.
[09:36:54] <bin> i m left with arbiter and secondary
[10:24:32] <joannac> You're right kali, i didn't think that through >.< my bad
[11:16:07] <tiller> Huum, I'm sorry for the foolish question I'm about to ask, but on : https://github.com/ansible/ansible-examples/tree/master/mongodb
[11:16:20] <tiller> They have this architecture: https://github.com/ansible/ansible-examples/raw/master/mongodb//images/site.png
[11:17:16] <tiller> And I'm not quite sure to understand how it works. Because they use only 3 server. How can there be 3 shards and 3 replicates? 3 mongod are running on each server or I just misunderstood how it works?
[15:46:50] <dandre> now I must update some of the subdocuments in foo. Can I do that in one run or must I send on update per subdocument?
[15:58:36] <dandre> In my case I must update (or insert) some subdocuments identified by a key i foo. These updates come from an array of documents. Can I update all those subdocument in one run or must I do one update request for each subdocument?
[16:01:23] <leifw> can someone help explain to me what changed about optimes between 2.2 and 2.4?
[16:02:27] <leifw> somewhere we gained precision to milliseconds for the t part, but I'm having trouble understanding which formats did change and which did not, and what really happened to the javascript representation of optime/Timestamp types
[16:14:16] <ajph> hey. does anyone have any idea how to batch insert with the mgo Golang driver?
[16:20:06] <pwelch> hey everyone. does anyone know of a way to see how long a node in a cluster has been Primary without parsing through the logs?
[16:20:48] <pwelch> I know of rs.status() but dont see anything about how long that node has been the primary
[16:46:45] <rekibnikufesin> pwelch: Not aware of anything other than logs that would have that
[16:55:57] <hanser> i have a collection that stores documents as like http://www.hastebin.com/xayujagiho.apache, i want to update activator field (that is an array object), i used something like " > db.data.update( { key: "DEF", 'activator.cpuid': '3' }, { $set: { activator: { os: 'osx' } } } ) " this override whole activator object i would like to keep activator's other fileds too, any help ?
[17:01:48] <astropirate> Friends, how do I do a case insensative searches on fields
[17:01:56] <astropirate> are regular expressions the only way?
[17:04:52] <astropirate> friends, why have thou forsaken me?
[17:06:44] <hanser> answering my own question update statement should be : "db.data.update( { key: "DEF", 'activator.cpuid': "3" }, { $set: { 'activator.$.os': 'osx' } } )"
[17:16:53] <rekibnikufesin> Dev drops a sharded, tagged collection last night. Recreates, but doesn't shard (tags still exist). Starts getting errors accessing collection: stale config. I then dropped the collection, removed tagging. Recreated, re-sharded, re-tagged- all is cool until this morning. Now all mongos routers are getting "too many retries of stale version info" when querying that collection
[17:19:34] <dandre> I have this document: {foo:[{name:"name1"},{name:"name2"},{name:"name3"}...]}
[17:19:34] <dandre> I want to remove from foo all subdocuments where name is either name1 or name2. How can I do that?
[17:21:44] <stevefink> What timezone are DateTime objects created in by default? UTC? local machine time?
[17:44:10] <dandre> I think it is #milliseconds from epoch
[18:19:20] <bmw0679> What are the best practices for fast geospatial queries?
[18:40:15] <qswz> if mongo 2D feature is not fast enough for you
[18:40:25] <qswz> you could do something with http://en.wikipedia.org/wiki/Quadtree
[18:41:29] <qswz> it basically puts 2d coordinates in a 1D through a tree
[18:42:16] <includex> hi guys, little question: I've build a replicaset (primary+secondary+arbiter) setted auth and keyfile and through rs.status it looks working: http://pastie.org/8547962 but I can't auth and run rs.status in the arbiter. I can't even auth on it. any tip?
[18:50:13] <encaputxat> i have the same problem of https://jira.mongodb.org/browse/NODE-104
[18:53:13] <includex> "This is convenient, since you CAN'T log in to the arbiter ... it has no admin database to hold the system.users collection" humm ok :)
[20:28:07] <nicholi> quick question, to modify a user's roles...do you operate directly on db.system.users array ?
[20:36:49] <dgaffney> So, uh, I get this when I try out map-reduceā¦.
[20:37:02] <dgaffney> Any obvious reasons for this total MR fail?
[20:49:40] <joannac> dgaffney: "MongoDB will not call the reduce function for a key that has only a single value. The values argument is an array whose elements are the value objects that are .mapped. to the key."
[22:07:18] <dgaffney> joannac: can you provide an example that is that simple that actually runs?
[22:11:01] <dgaffney> ahh, I think I get this now. NVM!
[22:11:43] <joannac> dgaffney: damn, i just pasted :p
[23:13:43] <quuxman> Is there a way to group updates so they only perform a single index operation? I'm trying to update just a couple thousand records, but I'm updating a massive multi_key index, so it's taking an unreasonably long time
[23:51:20] <quuxman> is there a mechanism for bulk updates?
[23:51:42] <quuxman> or to allow for a certain index to not update?