PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 24th of May, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:06:23] <Nicekiwi> heyy, so I created a new user with db.createUser on a db, and try to connect to it, but I get "auth failed" ?
[00:08:33] <Nicekiwi> the user has userAdmin role on the db
[00:20:09] <Nicekiwi> anyone here?
[00:21:02] <jamesd> no that dead beat stole our beer money... and now we are runing short of beer.
[00:21:11] <Nicekiwi> noooooooooooooo!!!
[00:30:45] <federated_life> jamesd: no HA setup huh ?
[01:35:10] <Nicekiwi> heyy, so I created a new user with db.createUser on a db, and try to connect to it, but I get "auth failed" ?
[01:35:12] <Nicekiwi> the user has userAdmin role on the db
[06:06:13] <arussel> I have a doc looking like: {"foo": {"bar": {"1": "x", "2":"y"}}} , I'm trying to remove "1":"x", so tried $unset: {"foo.bar.1":""} but got: Can't canonicalize query: BadValue Unsupported projection option: $unset
[06:06:19] <arussel> any way around it ?
[06:20:09] <arussel> found the way, I create an object: var foo = {"foo": {"bar": {"1": ""}}} and then pass it to update
[06:25:53] <arussel> hmm, this just remove bar completely ...
[06:47:09] <erik_x1> arussel: you can do something like
[06:47:19] <erik_x1> x = db.foo.findOne({_id:"thatdocument"})
[06:47:28] <erik_x1> delete x['foo']['bar']["1"]
[06:47:37] <erik_x1> db.foo.save(x)
[06:52:07] <erik_x1> the problem is that when using dot notation like that to access a key in a subdocument, mongodb is interpreted the "1" as an array index
[06:54:20] <erik_x1> actually, works ok for me in a 2.4 shell.
[06:54:45] <erik_x1> > db.test.update({"_id" : ObjectId("538040ca993136363ac7a8e0")}, {$unset:{"foo.bar.1":""}})
[06:54:53] <erik_x1> { "_id" : ObjectId("538040ca993136363ac7a8e0"), "foo" : { "bar" : { "2" : "y" } } }
[06:55:43] <arussel> yeah, I've worked around the issue getting the object, modifying it and resetting it
[06:56:15] <arussel> weird that the unset would work for you, I'm on 2.6 but not sure that this should matter
[06:56:59] <arussel> I'll check my syntax
[12:20:18] <sgo11> I am a newbie to mongodb. I am reading the official manual. I don't really understand the page http://docs.mongodb.org/manual/tutorial/perform-two-phase-commits/ . I think it's wrong. For example, in "Rollback" section, it says "After you create the transaction (i.e. the first step), but before you apply the transaction (i.e the third step)", then need to "Undo the Transaction". I think it's wrong. Before the third step, the operation (db.accounts.update
[12:20:19] <sgo11> ) never runs. can anyone tell me if the manual is wrong or I am wrong? thanks.
[12:22:13] <sgo11> the manual says "undo the transaction operation from both accounts." BUT before the third step, the operation never happens. why undo?
[12:32:04] <thykka> noob question: how do I find an entry by it's _id?
[12:32:54] <thykka> db.users.findOne({_id: "5379e981b674f3e74ef5e9da" }) ==> null
[12:33:11] <thykka> db.users.findOne({_id: ObjectID("5379e981b674f3e74ef5e9da") }) ==> ReferenceError: ObjectID is not defined
[12:34:34] <sgo11> thykka, I just studied mongodb for 2 hours. but i think you should use ObjectId instead of ObjectID
[12:34:51] <thykka> ah
[12:35:23] <thykka> thanks, didn't notice the capitalization there
[12:35:41] <sgo11> thykka, you're welcome.
[13:11:47] <sgo11> I posted a topic in google group. but it's not displayed in the list. why?
[13:42:29] <thykka> how do I query wether a certain value is included within a field's array?
[13:45:36] <thykka> eg. i have entries which have a list of values, and I wish to find all entries which include a certain value
[13:45:46] <thykka> s/list/array
[13:54:11] <thykka> kinda like this http://pastebin.com/iGDWb85c
[14:02:10] <thykka> hmm.. obviously i've made a retarded mistake and saved the values as a comma separated string instead of an array, but still...
[22:05:55] <obfuscatr> hi all, having probs getting mongo install in ubuntu 14.04. apt-get install mongodb constantly reports invoke-rc.d: initscript mongod, action "start" failed.
[22:06:49] <obfuscatr> have tried instructions to install from mongodb.org repo, but same result
[22:20:50] <cheeser> try running mongo --conf <your config file> manually and see what the output is