[04:11:56] <Boomtime> how will the secondary possibly connect to that?
[04:13:24] <Boomtime> the primary can see the secondary because it can use "192.168.100.7:27017" to get to it, but when the secondary tries to route back to the primary, it tries to find "localhost.localdomain:27017" which will lead it back to itself...
[04:55:00] <Boomtime> the first one multiple parallel queries for ($or) each for any number of matching items (though each will always be zero or one) which are then collated into a single result set at the end
[04:55:42] <Boomtime> the second one is a single combined query on a single index with a single plan matching any single value from a list, the results are piped directly
[05:03:21] <jchia> Boomtime: So for the first one, the client-side will actually issue multiple queries?
[05:04:56] <Boomtime> no, the server will break out each $or and run them in parallel
[05:05:07] <Boomtime> but the effect is nearly the same
[05:05:22] <Boomtime> $or should only be used for disparate clauses
[05:05:51] <Boomtime> the semantics will work for your use case but $in will be better
[08:36:00] <Katafalkas> Hey, How do you configure PyMongo to connect to mongos, but to read from secondaries ?
[08:39:33] <jerome-> Is there anything wrong with this url: mongodb://192.168.174.202:27018,192.168.174.202:27019,192.168.174.202:27020/?replicaSet=mammouth ?
[08:39:57] <jerome-> with mongo cli, I get this error: Assertion failure _setName.size()
[08:56:11] <tyteen4a03> on the _id field: Is it possible to generate this yourself on the client side instead of having mongo generate it? it seems from some examples this is possible but is it legal to do so?
[09:03:05] <kali> you may want to store it as a binary and not the hex string
[09:03:44] <kali> it will be more compact, and should avoid identity issues if someone decide to change the case at some point
[09:04:12] <Derick> kali: fun fact, if the driver doesn't supply an ObjectID, the server will make one
[09:34:21] <jordz> Does anyone know where I can find some indepth documentation of what mongos is doing? I'm looking for a little more info on what it's allocating in memory?
[09:35:10] <jordz> For instance, running 2 mongos instances, will they pretty much store the same information in memory or does it only pull out what it needs based on the queries it recieves?
[09:38:01] <ome> Anyone here worked with Go mgo? I can't find a way to use a mgo.DBRef in Query.
[11:35:59] <vrkid> Hi, we've installed MongoDB Enterprise and configured SSL, how can I test that SSL actually works?
[12:48:00] <ckozak_> Anyone have experience with the mongo-java-driver?
[12:50:38] <ckozak> Any way I can use a DBDecoder (or more specifically a BSONCallback) with DBCollection.aggregate?
[12:52:47] <cheeser> setDecoderFactory on the DBCursor
[12:56:15] <ckozak> cheeser: Ah, the cursor isn't created with the decoderfactory from the DBCollecitonImpl?
[12:59:15] <cheeser> it is. but you can override it before you start iterating that cursor
[13:00:51] <ckozak> cheeser: I don't think that's happening in practice, if I do collection.find(), my data has been modified by the callback, however when I use .aggregate, my factory/callback isn't used
[13:03:05] <cheeser> you called collection.setDBDecoderFactory()?
[13:03:56] <ckozak> cheeser: Yep, that's how it gets called with collection.find() :-/
[13:04:28] <cheeser> DBCollection passes that in to both DBCursor and QueryResultsIterator
[13:04:59] <ckozak> Yeah, I see where that should be happening, not really sure why it doesn't
[13:15:21] <tyteen4a03> are there tutorials on how to write motor code that will work with tornado tests? I made calls like I would normally do inside a tornado app but nothing gets written into the DB
[14:10:34] <Diplomat> Hey guys.. any ideas whats wrong when mongodb wont update log file when it crashes and there is pretty much no way to diganose whats going on..
[14:11:01] <Diplomat> i have tried restarting mongodb itself.. my vm.. but it doesn't still work
[14:11:14] <Diplomat> for some reason it worked yesterday but today when i booted my vm it fails again
[14:12:35] <Diplomat> oh.. mongo console itself works .D
[14:45:52] <cheeser> one tool is not going to cover them all
[15:00:00] <topwobble> I am seeing this mongoose error on our prod server: https://gist.github.com/objectiveSee/f33a97365ea5604fa954 We just ran and db update that involved changing a lot of document keys and dropping all indicies on one collection. Any ideas?
[15:00:10] <topwobble> ^^ this is all with mongoose
[15:19:26] <paulbeuk> hi, I could use some help with updating an object in an array
[16:23:30] <mchapman> Am trying to use gridfs with a root collection name other than fs using the node driver and am getting "need an index on { files_id : 1 , n : 1 }". I thought it should create the index itself?
[16:30:16] <mchapman> ignore that - reinstalling the driver has made it go away
[17:40:51] <SkramX> hey all. I've been using mongodb for a while but have always just done M/R. I want to try the aggregation framework. How would I do an aggregation over some of a collection? (ie where a key is equal to a given value)
[17:49:18] <SkramX> ah.. duh, okay, the array is ordered so match would go first and then project and then group
[17:50:48] <jordana> SkramX, yeah. I have something that matches, groups by a certain value with the sum of a field and then that is output either inline or to a collection
[18:35:45] <ejb> Hi, I have a situation where a Location has many Shows (as an embedded array of objects). There is also a Shows collection that contains the same data. I'm advocating for removing the Shows collection all together because it's essentially only there for archiving. Is there any downside to archiving Show data on the Location as an embedded array of objects? e.g. If the array grows to thousands of objects?
[19:17:59] <cozby> hi, in mongo when you're adding a dbAdminAnyDatabase role to a user, what db do you specify
[19:18:07] <cozby> because that role should be able to read all db's
[19:18:14] <cozby> do I just specify admin as the db?
[19:56:28] <revoohc> Does anyone know if a mongodump is version safe? We need to archive ~1TB of data from 2.2.4. If I use mongodump, will 2.6 or 2.8+ mongorestore be able to read it?
[19:56:37] <benjwadams> greetings, I've inherited a project using mongodb and am a relatively new user. I need to add a field inside an array of subdocuments. How might i go about doing this?
[19:57:00] <benjwadams> i.e. for each subdocument within each array, add a field.
[19:58:19] <cheeser> benjwadams: look at $push and $addToSet
[19:59:02] <topwobble> I just ran ‘db.validate()’ on a corrupt collection. The only issue is with corrupt indicies. Do you know if running repair will delete the indicies, or the indicies + games associated with them?
[19:59:17] <topwobble> Here’s the output of db.collection.validate(true): https://gist.github.com/objectiveSee/7b5849f310fee4ba74aa
[19:59:24] <benjwadams> i don't think $push is what i'm looking for. I don't want to add a new element to the array
[19:59:35] <benjwadams> let me pastebin the schema really quick
[20:42:32] <gswallow> \/var/lib/mongodb is a bind mount
[20:42:52] <gswallow> why is it telling me I have an excessive readahead?
[20:44:27] <jpavlick> imagine a collection, `users` with documents of the form `{ _id: ObjectId, blocks: [ObjectId] }` What is the most efficient way to query `Give me all users there user {_id: 12} is *not* blocking`? I can only think of a two part blocks=query: find(_id: 12).blocks, find(_id: $nin blocks)
[21:02:03] <sandstrom> I've got an issue with replication. A while ago optime variance increased (see pic: http://s1.postimg.org/wnjsxsrxr/Screen_Shot_2014_08_20_at_22_57_13.png). Network activity is down on the node. CPU and disk usage is unchanged.
[21:02:52] <sandstrom> What should I dig into to determine the cause? My hunch is that replication has stalled/hung, or is severely restrained somehow (due to replication of large amounts of data perhaps??).
[22:24:06] <jasondockers> Can I export documents and then import them to another database?
[22:50:32] <joannac> you should dump and restore instead jasondockers
[23:17:57] <shinka> I'm trying to do a search inside an object (NodeJS/Mongoose) and for some reason (probably something simple) it doesn't work. My Schema has "var WordSchema = new Schema({ meanings : [{ gloss: [String] }} });" and my search has "WordSchema.static('findByGloss', function (x, cb) { return this.find({ meanings: [ { gloss: { '$in': [x] } } ] }, cb); })";
[23:18:07] <melvinrram> I'm trying to figure out how to use $group inside aggregate to get the latest document that has the unique combo of fields I'm looking for. For example, I have the collection on https://gist.github.com/melvinram/a32d44a0554598d07c87 and I also have a unique_combos that I want to look up by. I have the $match query returning just the right documents
[23:18:07] <melvinrram> , and $sort setup so it returns it in reverse chronological order. I took a stab at it and the code is on the gist linked to. It's currently not returning correct values. (currently returns no values).
[23:33:58] <jasondockers> How do I add an objectid to a field with the c++ driver? .append("value", mongo::OID("53c01ca23a0dcb37ceaebef7)) doesn;t work?
[23:43:11] <Ryan_Lane1> I have an issue with the PHP driver (1.5.5) where if a node is added to a heavily loaded load balancer, the first request for each apache process returns "No candidate servers". We have a loop that will exponentially increase the connect time and re-try the connection, but in this condition the loop goes through all iterations immediately, without any timeout
[23:43:41] <Ryan_Lane1> I think for some reason all servers are being immediately added to the blacklist, but can't determine why this would be the case
[23:44:00] <Ryan_Lane1> subsequent requests seem to work (past the ping_interval)
[23:44:29] <Ryan_Lane1> I also occasionally see this condition on apache gracefuls and restarts