[00:00:09] <GothAlice> (The link I provided is a day-of-the-week aggregated report of general activity levels for, usually, a two week period. Used to compare a two-week period vs. another a la http://cl.ly/image/3X2o1W0X1d2m)
[00:04:26] <mongoooo> how do you find python + mongo? i'm using mean stack and come from a rails background, so i wonder how mongo plays with something like ruby or python
[00:05:05] <GothAlice> I fscking love it, pardon my UNIX-ish explataive.
[00:09:47] <GothAlice> mongoooo: I pm'd you some links so as to not spam the channel. ;)
[00:29:40] <harph> I'm trying to add a replica set by doing rs.add('repl.02:27017')
[00:30:07] <harph> and I'm getting this error: set name does not match the set name host repl.02:27017 expects, Any ideas why?
[00:31:08] <GothAlice> harph: Could you pastebin the mongod.conf config file for that host and the command line? (ps aux to find the PID of mongod, cat /proc/<pid>/cmdline)
[00:32:02] <harph> this is what I got in repl.02: mongodb 2677 1 3 00:23 ? 00:00:12 /usr/bin/mongod --config /etc/mongodb.conf
[00:54:14] <GothAlice> Well, if it's the same error there's still a mismatch there. You didn't give me the commandline.
[00:57:39] <harph> GothAlice: yes, this is the cmdline /usr/bin/mongod--config/etc/mongodb.conf
[01:00:13] <GothAlice> Okay, so no --replSet on the CLI, that's good.
[01:01:01] <GothAlice> If that node doesn't contain anything, I'd recommend nuking /var/lib/mongodb/* (but keeping the folder) and restarting once more. It might have recorded the old replSet name.
[01:23:36] <joannac> don't ever do searches like that unless you are 100% sure you know the order and types and nothing will get rearranged and ... just don't do it
[01:25:15] <GothAlice> joannac: Sometimes I'm wrong. I enjoy being corrected! Thank you.
[01:26:19] <joannac> GothAlice: yeah, dicts don't preserve order, I think it's in the JSON spec. But matching on documents requires strict order.
[01:27:14] <joannac> I think I asked once about that but I don't remember the answer
[01:28:18] <joannac> And no problem, sorry for the rant. it's one of those things everyone gets wrong at least once and I don't want the incorrect answer propagated :)
[01:50:58] <GothAlice> https://gist.github.com/amcgregor/15166fd78d00c03f1592/8c4b954925da995a9c03e0c635fe22a6087348ca just made my face implode. (Assisting a MongoEngine user in another channel.)
[01:52:12] <GothAlice> There are so many anti-patterns in that it's hard to know where to start. locals()['#boxes'] assignment is not a half bad choice, though.
[02:38:41] <TheWhiteOx> Hey what's the command to update or create just one datafield of a document?
[02:41:33] <TheWhiteOx> So i could do something like Collection.update({$set: {newKey: newValue}}); and it'll just insert a new key value pair without overwriting the entire document?
[02:44:02] <GothAlice> Except that exact update might not do what you think. (Assuming it's p-code, you grok the idea, but it's a bit strange.) It's important to note that MongoDB makes a distinction between update-one and update-many.
[04:46:50] <TheWhiteOx> Hey anybody know the syntax to return a stored string value from a specific key in a mongodb document, given I had the document ID?
[04:54:33] <GothAlice> TheWhiteOx: (I wrote the MongoEngine .scalar() thing to avoid that ugly double field reference. I.e. {specificKey: 1} followed by .specificKey on the returned result.)
[10:43:14] <Synt4x`> Ok there it is, my question :-p
[10:43:18] <Synt4x`> I think that will make the most sense
[10:48:59] <Synt4x`> It's basically, I have a bunch of data I'm calculating on the fly, and want to know what I should store, and what I should calculate each time
[10:52:30] <Synt4x`> nevermind too tired, will work more on it tomorrow, goodnight guys
[12:00:00] <arussel> I'm tying to run a $rename query but got that error: cannot create details for $rename mod
[13:39:50] <dreambox> hey guys, I m trying to figure out if theres any tool that works without a billion configurations to browse through a webpage my mongodb collections/databases
[15:18:01] <appleguru> anyone up for helping a mongo noob with a find() query?
[15:29:00] <redfox_> appleguru: just tell us your problem
[15:29:37] <appleguru> trying to get a result set that contains only the elements that have a key with a specific value
[15:30:12] <appleguru> but when I run my query.. I get all the other elements as well (that don't contain the value I want) that are part of the document
[16:09:43] <ali_> can anyone take a look at this, please? http://stackoverflow.com/questions/26563396/mongoose-schema-sub-document-reference-with-attributes
[16:37:40] <appleguru> I am writing a python script to parse mongo's son output to find the data that I want... I feel like I'm defeating the entire purpose of having the data in a database to begin with...
[18:22:16] <rainforest> except i also repaired mongo
[18:22:23] <rainforest> not sure if repairing was necessary, but it worked
[18:22:24] <GothAlice> Indeed; if it crashed, it may have required repair.
[18:22:41] <GothAlice> Do you have journalling enabled?
[18:23:11] <rainforest> GothAlice: i'm not sure, how do I enable it?
[18:23:27] <GothAlice> rainforest: Check in your mongod.conf file (in /etc somewhere)
[18:24:15] <GothAlice> If you have journalling turned on (or turn it on) you'll very rarely actually need to run --repair; it should correct itself on next startup automatically.
[18:25:23] <GothAlice> http://docs.mongodb.org/manual/core/journaling/ describes journalling in more detail.
[19:21:43] <GothAlice> Hmm; pymongo seems to have changed its timeout behaviour; instead of raising ExecutionTimeout it now just returns an empty resultset. :/ Might be MongoEngine, though, capturing it upstream. Let me check.
[19:28:50] <GothAlice> Nope, MongoeEngine isn't capturing that exception. :/
[19:30:32] <GothAlice> "MongoDB doesn’t support custom timeouts for cursors…" via http://api.mongodb.org/python/current/faq.html#how-do-i-change-the-timeout-value-for-cursors — well, what the hojek happened to cursor.max_time_ms?
[20:00:10] <rainforest> i keep getting "Segmentation fault (core dumped)" when i run mongo::client::initialize();
[20:00:20] <GothAlice> rainforest: That's not good at all.
[20:02:14] <GothAlice> http://www.mongodb.org/downloads < the standard approach is to use the binary packages, usually the binary packages provided by your distribution.
[20:02:34] <GothAlice> Step one in diagnosing your segfault: try the binary packages.
[20:02:45] <GothAlice> If *they* segfault, you have a much, much bigger issue.
[20:02:49] <rainforest> i'm confused.. is this about the driver or mongodb itself
[20:03:07] <GothAlice> rainforest: "it took me forever to properly compile and link mongodb"
[20:03:40] <rainforest> this is the command i used to compile the driver: scons --prefix=$HOME/mongo-client-install --ssl --sharedclient --full --use-system-boost --c++11 --libc++ install-mongoclient --cxx=clang++ --disable-warnings-as-errors
[20:03:54] <GothAlice> But still; which distro are you on? Your distro should already have a package for the driver you can just drop in.
[20:03:57] <rainforest> i moved include and lib to /usr/ later
[20:04:56] <GothAlice> For me it's: "emerge dev-libs/libmongo-client dev-python/pymongo dev-python/mongoengine"
[20:05:04] <GothAlice> (That gets me the driver suite I typically use, on Gentoo.)
[20:05:27] <GothAlice> You'll have to reference the documentation for Ubuntu (and/or #ubuntu) for assistance on searching for and installing packages, though. I'm not familiar with that system.
[20:06:09] <rainforest> there's a package called libmongo-client-dev
[20:06:27] <rainforest> it says "Development files for the alternate C driver for MongoDB"
[20:06:27] <GothAlice> rainforest: Wait; did you "move" include and lib into /usr, overwriting the ones that were there, or merging?
[20:06:46] <rainforest> GothAlice: merging I guess since they weren't already there
[20:07:35] <GothAlice> 95% of the headers on my system are in /usr/include… and /usr/lib has 473 different libraries on my system.
[20:07:42] <GothAlice> If you didn't merge, you may have just hosed your system.
[20:09:44] <GothAlice> Yeah; I avoid manually throwing files into a Linux tree like the plague. The likelihood of something going horribly wrong is too darn high. (Always use your system's package manager.)
[20:10:04] <GothAlice> Also… having a way to cleanly *remove* something (or upgrade it later) is far too useful.
[20:11:04] <GothAlice> Did the segfault produce a useful traceback? (I.e. did you strip symbols from the compiled libraries?)
[20:12:45] <GothAlice> Without a stack trace / traceback, I can't really help diagnose why it may have crashed. (A traceback would point a big finger at a particular function or set of functions that died.)
[20:13:16] <rainforest> I'm not sure how or where to find a stack trace
[20:13:27] <GothAlice> (Beyond the intial call to ::initalize() — a trace would include the functions initalize() calls.)
[20:15:53] <rainforest> hmm, i really wanted to try out mongodb, but it's turning out to a a lot more work than i expected :|
[20:16:10] <GothAlice> Your situation is quite unusual.
[20:16:36] <GothAlice> First time I've heard of segfaults in a driver like that. I'd expect there's something wonky with how you are calling it or somesuch.
[20:17:57] <GothAlice> From what I can tell, however, working with MongoDB is insanely easier under an interpreted language with rich high-level objects (like attribute access dictionaries). You'll never have to worry about manually mangling SON/BSON again. ;)
[20:45:18] <middi> I am using Mongoose, which works great, but when I want to update a document I get the following exception and I am not sure what is causing it: exception: assertion src/mongo/db/structure/btree/key.cpp:597
[20:45:30] <middi> Do you have any idea what that could be?
[20:46:01] <GothAlice> middi: What is the update you are attempting to run? Sounds like you have an invalid key in one of your mappings.
[20:47:46] <GothAlice> Either that or it's attempting to index something it doesn't like. Either way, I'll need to see the query pastebin'd to assist.
[20:52:28] <middi> I just have a document with basically a new version. I use an update like {key: 'foo'}, {$set: {a:1, b:2, c:2}}, well an actually even more in them, like subdocuments. I tried making sure not having the key in the update and I tried using complete replace instead of $set.
[20:52:58] <GothAlice> middi: "like" is not sufficient to diagnose this problem; I need to see the *actual* update.
[20:53:58] <middi> Invalid key as in an invalid object key? I am trying to reproduce it on my end. It seems to happen only occassionally. But that really helps, if it's that what I am looking for
[20:55:02] <GothAlice> At this point it could be pretty much anything.
[20:56:52] <middi> Okay. I was just confused as of why it only say that an assertion fails in some line and I'm trying to figure out what the assertion actually states. I can't find it in the mongodb code.
[20:57:17] <GothAlice> You would need to look at the code matching the version of mongodb you are running.
[20:57:57] <GothAlice> btree/key is the clue as to what may have gone wrong. (keys as in dictionary keys or keys as in indexes; I'm just not sure which)
[20:59:02] <GothAlice> But again… if I could see the actual query you are running that is exploding, I may be of more help.
[21:00:00] <middi> Okay, thank you already a lot for your help. I have a longer running process to reproduce this and of course I thought I would have it, but made a mistake. iam sorry.
[21:52:27] <Bilge> Why doesn't mongoimport have any way to import data exported with mongoexport, which by default creates a separate directory per DB
[21:53:04] <GothAlice> Do you not mean mongodump, which outputs a directory per db?
[21:53:15] <GothAlice> mongoexport exports CSV, TSV, or JSON files.
[21:53:55] <GothAlice> (It'll output a directory per DB if you tell it to, but that isn't the default.)