[08:43:47] <jwilliams> i don't explicitly specify db.eval(), what might cause this to execute such func? and how to avoid it so that mr can be ran?
[08:56:17] <ndee> I have a documents with fields foo and bar and I want to copy the contents of field foo to field bar, all from the shell. Is that possible with one command? I took a look at the $set update modifier but I'm not sure if I can pass a field or only values.
[12:05:50] <Zelest> What are the numbers listed when doing a mongorestore? I did a dump and it seems to be counting docs.. but restore has some other numbers.. or a LOT higher numbers?
[13:57:31] <remonvv> Does anyone know if there are any public MMS statistics in terms of mongod/mongos crashes and so forth? Trying to get to a somewhat realistic MTBF of a mongo node
[14:07:38] <guawhitehawk> hello all! ive problems to aggregate the mongodb munin graphs with the example on the mongodb page. it generates NO cluster graphs but generates well the normal mongodb graphs.
[14:19:45] <guawhitehawk> can it be that i cannot aggregate graphs (no graphs) when i only have one active mongodb master, therefore i must stack them??
[15:55:23] <mw44118> We set up a replica set and our app code connects to the primary node; but after an outage, the slave became the primary. The app code then crashed because it wasn't talking to the master any more
[15:55:58] <mw44118> can i configure my app code so that it switches automatically to the new primary after an election?
[16:09:14] <dgottlieb> mw44118: not sure about mongoengine, but the pymongo docs on replica set connections: http://api.mongodb.org/python/current/examples/replica_set.html#id1
[16:10:33] <mw44118> dgottlieb: so, if the primary dies, and one of the secondaries becomes the new primary, with pymongo, the app code will still operate correctly?
[16:14:00] <mw44118> it seems like I would need to trap some exceptions, and sleep or retry for a while, until the system heals
[17:47:59] <freezey> or the other guy yeah we have one
[17:48:10] <freezey> i am to busy coding half the time
[17:49:40] <groundnuty> hey, is it possible to use mongodb without runnign a server? - similar to sqllite? if not you gyus know any nosql dbs like that?
[17:52:40] <cas> Hi, is it wise to use mongodb for inserting lots of objects (60 p/s) with a datetime as key and selecting ranges(start/stopdatetime) from it?
[18:09:36] <freezey> ranman: i was digging around on your guys site and dont see much about ideal mount options for SSD i would assume defaults isnt the best route
[18:13:14] <ranman> freezey: right. we're actually working on speccing that out right now.
[18:32:47] <freezey> yeah doesnt exaplin much about mount options but
[18:56:20] <revnoah> Hello. I'm a bit unclear on manual references, and the online manual is a bit sparse. I expect that they should be defined in the model but I'm not sure how. Can someone point me to a good example of best practices for manual references?
[18:57:11] <ranman> revnoah: it's just a separate query.
[18:59:51] <revnoah> ranman: that much I understand, and running the query separately works fine. What I have set up in my mongoose model is a virtual variable that I want to return a location name based off of the id. When I try to put a findOne() function in my custom virtual variable function, it doesn't execute in the right order to return the variable.
[19:01:05] <aheckmann> revnoah: virtuals are synchronous.
[19:01:25] <aheckmann> revnoah: findOne will not respond until after the virtual finishes running
[19:02:06] <aheckmann> revnoah: use a method if you need to do async and design it to accept a callback
[19:02:22] <aheckmann> revnoah: pass your result to the callback when it responds
[19:02:54] <revnoah> okay, that makes sense though is a bit irritating.
[19:03:46] <revnoah> you wouldn't happen to know of a good resource that might have example code, would you?
[19:04:22] <aheckmann> revnoah: a virtual is just a getter under the covers. http://mongoosejs.com/docs/virtuals.html
[19:07:30] <revnoah> thanks, though the virtuals I have referencing the same object, such as in these examples, are working fine. But your suggestion of a helper callback function points me in the right direction.
[19:08:46] <diZLeXiK> hey, quick mongoose question regarding "populate" functionality. if i do something like Whatever.findOne(...).populate('something'), two queries will fire off to the database, correct? what happens if i do Whatever.find(...).populate('something') where, say, 5 Whatevers are found? is the database queried 6 times?
[19:09:46] <diZLeXiK> or is mongoose smart enough to take all of the values of 'something' after the 'find' and make one query for the child Whatevers?
[20:32:12] <ranman> Sim0n… how badly did this thing go down?
[20:32:48] <ranman> Sim0n and how much space is free? Journaling isn't perfect… and you could have gotten fairly unlucky but there could be something else going on.
[20:34:21] <Sim0n> ranman: So the server just locked up and refused to be sshable. Restart of machines is the only thing that helped. Database with indexes is 471gb, 242gb free.
[20:35:01] <ranman> in the logs, are there any asserts right before the node goes down?
[20:39:23] <ranman> Sim0n: as far as getting this to work, you can try to make a snapshot of another secondary and just resync from that (although 470gbs is gonna take a while so try to repair first)
[20:40:00] <Sim0n> Its my understanding that a repair will walk over all the data in the databases and take slots and lots of time?
[20:40:06] <Sim0n> Thanks for you help btw! Appreciate it.
[20:40:33] <Sim0n> Yeah, the other secondary is recovering at the moment :/
[20:41:09] <Sim0n> Ive shut down all the processes that writes and reads from mongo to relief the primary,
[20:43:16] <Sim0n> We had a similar issue last week, I dont remember the details exactly but the same machine got a similar issue and we ended up just dropping all the data and syncing from scratch. At that points we had one primary and one other secondary. But since there is only one primary and the other node is recovering it leaves me a bit stressed out about doing anything drastic.
[20:50:49] <Sim0n> We have one of the on EC2(The one that is recovering), the other two are in the office. The failed one is on a RAID-0 with two SSDs.
[20:52:56] <Sim0n> The primary is on one SSD, while the failing one is on two. So this makes me think that there is something wrong with the raid(since the same machine died last week aswell)
[20:54:09] <ranman> So there are several SSDs that have some odd issues with RAID0
[20:54:29] <ranman> I was trying to find a link for you but I can't find the one I'm thinking of
[20:55:25] <Sim0n> Im pretty sure that one of the disks in that raid is a Crucial, the other one im 100% sure is a Crucial C300
[21:07:48] <Sim0n> Im looking in the mongodb log on the angry machine and noticed that it says [rsSync] replSet syncing to: {the-machine-that-is-recovering}. Will this affect the recovering in any way?
[21:10:25] <Sim0n> Would it be a bad idea to stop mongo on that machine remove the images-files from disk and then restart? Would that sync back the missing database then?
[21:10:44] <Sim0n> Sorry for all my noobish questions. Im not a database admin :)
[21:22:58] <dstorrs> is there a way to exclude a particular collection from replication?
[21:24:00] <dstorrs> I've got a handful of high-traffic collections that are used as job queues. they get a lot of inserts and updates, but then end up empty again almost immediately. the jobs are time-sensitive, so there's not much point in retrying after a recovery. seems like a pointless burden on the oplog
[21:43:15] <Sim0n> I ended up just dropping all the data and doing a resync, lets hope for the best. Cheers for your help ranman!
[21:50:15] <mids> oh wait, overlooked the wildcard :(
[21:50:52] <mehemoho> ahhh ok, it is the main problem of the query
[21:51:39] <ForSpareParts> Hey, guys. I'm new to NoSQL stuff, and I was hoping someone could explain very briefly how you'd map out, say, a blog with posts and associated users in mongo or something like it. Is there a good way to do that, or is that something you just *shouldn't* do with a NoSQL database?
[21:53:50] <ForSpareParts> mehemoho, Thanks. I had a suspicion that I was looking at it the wrong way. Could you give me an example of a problem that "fits" NoSQL better? Trying to figure where it belongs in my toolkit, so to speak.
[21:55:24] <gnarf> TBH - the strength of NoSQL stuff is that you really don't have to think too hard about the schema, cuz there isn't one... just make logical choices about data and you wont go wrong
[21:55:54] <mehemoho> mids: thank you very much! :)
[21:56:25] <ForSpareParts> gnarf: So, I think this is part of what's confusing me -- if I could easily make references to other data by key, and if that is, in fact, accepted practice, how is this non-relational? Is it just because the database doesn't explicitly acknowledge those relationships?
[21:57:17] <mehemoho> u can share documents with different "fields" in a same collection
[21:57:25] <mehemoho> u can put documents into documents
[21:57:32] <macrover> where can I find a simple example scripts in java that shows importing json objects from a remote site into a collection. The remote site provides complete json document.
[21:58:10] <ForSpareParts> mehemoho: Ah, okay. That... actually makes a lot of sense.
[22:01:38] <mids> macrover: take a look at com.mongodb.util.JSON.parse
[22:01:58] <ForSpareParts> mehemoho, gnarf: Would it be reasonable for me to think of the "schemaless" way fields are handled in a NoSQL database as something like duck typing in, say, Python? In that document structure is defined not by some external schema but by whatever properties the documents actually share?
[22:02:20] <gnarf> ForSpareParts: pretty much, documents are ducks
[22:02:54] <ForSpareParts> gnarf: Shiny. I'm feeling a little better about this, then.
[22:10:20] <mids> ForSpareParts: there are some good presentations on schema design that might interest you; for example http://www.10gen.com/presentations/mongosf-2012/schema-design-by-example
[22:15:43] <npa> question: I'm writing a Ruby script to call mongodump on a sharded collection. if I lock the cluster according to the manual, and I write to the collection with another script while executing the dump, the dump just hangs. the backup script works fine when I do not use the locks. is there a good way to still create consistent backups with a script without using fsync+lock (besides using journaling and snapshots)? also, has anyone else encountered this sort o
[22:15:43] <npa> f problem with fsync+lock before in MongoDB 2.0.4?
[22:30:01] <mritz> does mongo use about the same ram as the size of the bsons ?
[23:06:38] <vsmatck> mritz: http://www.mongodb.org/display/DOCS/Caching This outlines it.