PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 2nd of January, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[03:21:46] <Logicgate> Is it possible to free up the ram used by mongodb?
[03:21:52] <Logicgate> It's using 11gb out of 12gb ram
[03:29:55] <_sri> switch to TokuMX, then you get more control over memory usage http://www.tokutek.com/products/tokumx-for-mongodb/
[03:55:50] <darius93> 11GB of ram being used by mongodb? o.O
[03:58:36] <jeffwhelpley> In SQL you can update one table with data in another using UPDATE SET FROM. How can you do something similar in MongoDB? I elaborate on this in a post I just put up on StackOverflow: http://stackoverflow.com/questions/20876030/update-set-from-in-mongodb
[03:58:51] <jeffwhelpley> any ideas would be greatly appreciated
[04:47:52] <darius93> jeffwhelpley: i believe its possible. let me check and see
[04:48:45] <darius93> http://docs.mongodb.org/manual/tutorial/modify-documents/
[04:48:52] <darius93> jeffwhelpley: ^
[14:53:53] <pwaleczek> hey people!
[14:55:30] <Derick> hi
[14:58:32] <pwaleczek> Derick: maybe you could help, I'm trying to insert a doc with a shell script and need the newly created docs' id, but the db.collection.insert() output is empty
[14:59:08] <ppetermann> pwaleczek: you are doing db.collection.insert(document), right?
[14:59:24] <ppetermann> document._id what you need?
[14:59:27] <kali> pwaleczek: create the _id yourself, put it in the docuemnt berfore inserting and print it
[15:00:16] <pwaleczek> ppetermann: exactly
[15:00:39] <kali> pwaleczek: ho. sorry
[15:00:52] <ppetermann> pwaleczek: do you have to use insert()? wont save() work for you?
[15:01:13] <pwaleczek> kali: I don't want to use custom ids
[15:01:58] <kali> pwaleczek: save() or insert() will just do a "new ObjectId()"
[15:02:07] <kali> pwaleczek: just do it yourself
[15:02:39] <ppetermann> save() actually inserts it into your object as well
[15:03:08] <pwaleczek> ppetermann: but the result is the same as insert, no object is returned
[15:03:27] <bmcgee> Hey guys, I'm playing around with tailing the oplog and it's working fine except for one thing: I can't seem to get it to tail after a certain timestamp.
[15:03:53] <pwaleczek> Why does the insert command not return the created object?
[15:03:54] <kali> document["_id"] = new ObjectId; db.foo.insert(document); print(document["_id"]);
[15:04:25] <ppetermann> pwaleczek: http://nopaste.info/71abf30eff.html
[15:04:41] <ppetermann> the document you hand to save will have the _id afterwards
[15:08:00] <pwaleczek> ppetermann: Cool, that worked like a charm, thanks!
[15:46:52] <wxcv> isn't there a way to simplify foo.find( {$or:[{b:null}, {b:[]}, {b:{$in:['f']}}]} )
[15:47:30] <wxcv> checking whether the array doesn't exist, or is empty, or contains a specific item
[15:48:02] <wxcv> I thought about foo.find({b: {$or:[null,[],{$in:['f']} ] } } ) but that's not correct
[15:56:49] <wxcv> also {b: []} vs {: {$size:0}} which one is recommended?
[16:36:34] <Metalpwned> Hi, I have problem with mongodb. I use it with PHP. Now I want to insert some data. $col->insert(array( '_id'=> $id, 'value'=> array($english,$german) )); now i want to change "english,german" into an array because I have a variable number of words. $col->insert(array( '_id'=> $id, 'value'=> array($arrayValues) )); Inserts me into the array for example: "bread, Brot" I want it like this "bread", "Brot"
[16:36:53] <ron> Nodex
[16:37:24] <Derick> Metalpwned: that's what it does as long as $arrayValues is not actually a string "bread, Brot"
[16:39:51] <Metalpwned> I call the php file with an javascript file $.get("insertMongoTest.php?id="+$idvalue+"&arrayValues="+$arrayValues,function(response) and in this case "$arrayValues" is an array. In the php-file I do this $arrayValues=$_GET["arrayValues"];
[16:40:57] <Derick> Metalpwned: var_dump($arrayValues) shows what?
[16:45:25] <Metalpwned> string(10) "bread,Brot" so its not an array
[16:45:43] <Derick> there you go :)
[16:46:35] <Metalpwned> well^^ then there is a problem between the javascript and thehand over to the php file
[16:47:20] <wxcv> anyone could tell me where $or can be placed? as far as I understand only in the documentQuery root, or in the root of a $and array
[16:48:11] <wxcv> I was trying things like find( { foo: {$or: [null, 1, 2]}} )
[16:48:28] <wxcv> which would have been nice if it worked
[18:28:37] <Reflow> is there a mongodb gui or web admin
[18:52:46] <sharondio> Reflow: Not officially. I have MongoHub for Mac. And there is Deployd, which includes a basic web admin. But nothing like MySQLAdmin
[19:10:30] <betty> I have a question about replication. During a YouTube video tutorial (I forget which one) someone mentioned that 'replica sets' could be used to create a multi-master replication architecture? Maybe I misunerstood what I heard, because the documentation says only the primary node can accept write operations.
[19:12:14] <betty> Our situation is that we have colleagues at a location on the other side of the globe from us and it would be desirable to have a fully replicated set of data at both locales that have full read-write access. Is something like possible?
[20:32:21] <kali> betty: don't go this way. multi master is not a supported setup, even if it's been said to work.
[20:33:34] <kali> betty: having a secondary there, and performing read locally on it, while still writting on the primary on your main site can help (if you can afford read-on-secondary eventual consistency)
[20:42:48] <betty> kali: thanks for the clarification; this may be suitable as operations at our secondary site would be more reads than writes
[21:27:39] <cortexman> i'm on mac and looking for a good mongodb editor ui where i can actually edit the data
[23:01:10] <unholycrab> rs.add()
[23:01:21] <unholycrab> assert failed : error: local.system.replset has unexpected contents
[23:01:50] <unholycrab> however; if i do rs.status() i can see that the replica set is configured and working
[23:03:34] <unholycrab> from utils.js: assert(local.system.replset.count() <= 1, "error: local.system.replset has unexpected contents");
[23:04:49] <unholycrab> i tried use local first and that didn't help
[23:05:50] <unholycrab> btw rs.add({"host":"example.local"}) gives me the same error
[23:06:01] <unholycrab> where example.local is the replica set member i am trying to add
[23:07:22] <joannac> Can you do use local; db.system.replset.find().pretty()
[23:08:40] <unholycrab> joannac: yes. shows 2 versions of the replica set
[23:08:55] <joannac> oh. how did that happen?
[23:09:46] <unholycrab> rs.conf() shows that the older version is being used
[23:10:07] <joannac> Remove the older one?
[23:12:01] <unholycrab> what is the safe way to do that
[23:12:08] <joannac> I'd be wary thoug about how you got 2 entries
[23:13:00] <unholycrab> looks like a new version was created with the priority fields, and for some reason was not used as the new configuration
[23:13:23] <unholycrab> should i just rs.reconfig
[23:15:39] <joannac> I doubt it would work, it would hit the same assert
[23:52:55] <unholycrab> joannac: im sure you are right now
[23:52:59] <unholycrab> it has to be that extra document
[23:53:09] <unholycrab> because the source code of utils.js checks for exaclty that