PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 28th of October, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:06:44] <gdoubleu> StephenLynx, do you use gridfs-stream for that?
[00:07:15] <StephenLynx> no
[00:07:25] <StephenLynx> that lib is pretty crap from what I read on its source code
[00:07:32] <StephenLynx> I just use the native driver
[00:08:15] <StephenLynx> gitlab.com/mrseth/LynxHub if you want to see what I DO
[00:08:17] <StephenLynx> do*
[00:08:35] <StephenLynx> wrong project
[00:09:42] <StephenLynx> https://gitlab.com/mrseth/LynxChan/blob/master/src/be/engine/gridFsHandler.js here
[00:09:49] <StephenLynx> this is the module that handles that.
[00:09:54] <StephenLynx> 304, streaming
[10:12:05] <LukeOne> hi
[10:14:17] <LukeOne> When importing big CSV files with 500k rows each, mongoimport confirms the import and the correct count but if I'm counting the collection around 750k entries the collection doesn't change the count anymore.
[10:14:32] <LukeOne> But the import confirms the import though
[10:14:38] <LukeOne> could somebody help?
[11:09:57] <kephu> hi
[11:16:46] <kephu> I'm trying to figure out a thing with aggregation: I've got a bunch of documents with performance variables (say, user,sys,idle). I'd like to be able to get an array containing all the data from those variables, as arrays themselves
[11:17:21] <kephu> like {data: [[user1,user2,user3], [sys1,sys2,sys3],[idle1,idle2,idle3]]}
[11:17:32] <kephu> of course with actual values
[11:17:36] <kephu> is that even possible?
[11:25:41] <acidjazz> hey everyone, can i get a shotout of everyoens favorite mongodb GUI? so far mongochef has been my favorite
[11:39:46] <StephenLynx> there are not good ones.
[11:39:56] <StephenLynx> no good*
[11:47:10] <kephu> ok so far, my best guess for my problem was to make an array-like object, with attributes like 'data.0'
[11:47:14] <kephu> but that seems hella wonky
[11:51:47] <aps> If I run db.fsyncLock() more than once, I'm unable to db.fsyncUnlock(). Is this a known issue? How do I Unlock now? :/
[11:51:48] <acidjazz> StephenLynx: what about mongochef
[11:51:58] <StephenLynx> I best its crap.
[11:52:03] <StephenLynx> let me see
[11:52:05] <StephenLynx> bet*
[11:52:56] <StephenLynx> >proprietary
[11:52:57] <StephenLynx> HAHAHAHHAHAHAHAHAHA
[11:53:30] <aps> acidjazz: do you work for mongochef by any chance? :P
[11:53:44] <StephenLynx> I bet he does.
[11:53:51] <StephenLynx> damn shills, man
[11:57:08] <acidjazz> aps: not at all
[11:57:24] <acidjazz> StephenLynx: i mainly like it becuase w/ guis im jusyt verifying and moving data
[11:57:33] <acidjazz> StephenLynx: and you can literally ctrl+c, ctrl+v db's and collections
[11:57:35] <acidjazz> so its fast
[11:57:40] <StephenLynx> it doesnt matter.
[11:57:41] <acidjazz> the UI is horrible and has no design
[11:57:43] <StephenLynx> its proprietary.
[11:57:55] <StephenLynx> you might as well e-mail them your database.
[11:58:00] <StephenLynx> with a copy to NSA
[11:58:08] <acidjazz> so you dont like it because it connects to your db
[11:58:13] <acidjazz> and accesses your db
[11:58:17] <StephenLynx> running a proprietary tool on a database is beyond idiotic.
[11:58:28] <acidjazz> why because we all have db's of credit card numbers
[11:58:29] <acidjazz> and users
[11:58:30] <StephenLynx> no, I don't like it because you don't know what the hell it does.
[11:58:45] <StephenLynx> you can't debug yourself
[11:58:48] <StephenLynx> you can't modify
[11:58:50] <StephenLynx> its trash.;
[11:58:51] <acidjazz> are you high
[11:59:08] <StephenLynx> cheeser this guy is advertising something, is that allowed by channel rules?
[11:59:23] <acidjazz> im in here to seek something better
[11:59:44] <acidjazz> and you are straight up either insane or trolling
[11:59:55] <StephenLynx> no, you are promoting malware.
[12:00:27] <StephenLynx> if you want something better, the terminal.
[12:02:55] <acidjazz> whats the terminal
[12:03:06] <acidjazz> is that in the app store
[12:03:30] <StephenLynx> wtf
[12:03:33] <StephenLynx> just type mongo
[12:03:41] <StephenLynx> there you go
[12:03:59] <acidjazz> mongo
[12:04:14] <StephenLynx> ...
[12:05:11] <sedavand> robomongo used to be ok, but it dosn't support the new auth schema :(
[12:05:24] <acidjazz> yea what ever happened, it hasnt been updated iun a while
[12:05:35] <acidjazz> i loved robo's cli-savy gui, color coding etc
[12:05:55] <acidjazz> if robo had more shortcuts like mongochef does it ditch chef
[12:06:50] <StephenLynx> http://i.imgur.com/0zXXODf.png in case you were not being a smart-ass
[12:07:16] <acidjazz> last fix from the team of 14 was april
[12:09:53] <acidjazz> StephenLynx: i was to see if you were trolling, also if you use the terminal alot you should check out mongo-hacker
[12:10:08] <acidjazz> http://tylerbrock.github.io/mongo-hacker/
[12:10:38] <StephenLynx> looks awful
[12:11:05] <StephenLynx> >This will rename your existing .mongorc.js file to .mongorc.js.orig and link mongo_hacker.js to .mongorc.js in your home directory
[12:11:09] <StephenLynx> kek
[12:11:27] <acidjazz> yeap or you can clone it and not run all that
[12:11:56] <acidjazz> or just deal w/ your insecure issues otherwise ;)
[12:11:58] <StephenLynx> >doesn't list dependencies
[12:12:05] <acidjazz> you do also realize mongodb itself is under a propietary license right
[12:12:15] <StephenLynx> god, you are fucking retarded.
[12:12:19] <StephenLynx> mongodb is free.
[12:12:41] <sedavand> :)
[12:12:42] <StephenLynx> MongoDB Database Server and Tools Free Software Foundation’s GNU AGPL v3.0.
[12:12:50] <StephenLynx> source: https://www.mongodb.org/about/licensing/
[12:14:06] <StephenLynx> and excuse me for having standards for software, it doesn't mean I am insecure, just that I don't run any random crap I find on the internet.
[12:14:34] <StephenLynx> specially proprietary crap on stuff that is meant to be secure.
[13:27:17] <Xat`> hi guys
[13:28:32] <Xat`> any idea why I get this error when the script use sleep() ?
[13:28:32] <Xat`> http://pastebin.com/eAyySvb8
[13:28:43] <Xat`> I don't have it without sleep()
[13:39:19] <christo_m> hello, im trying to query a subcollection.. namely, an item that has a user in it .. but when i try to do a query like { 'user._id': objectIDHERE } it fails to return
[13:39:44] <christo_m> how should i do the query? ive tried nesting it also like { user: { _id: objectIDHERE } }
[14:06:49] <amitprakash> Hi, is logging/profiling in mongodb blocking or non blocking?
[14:07:22] <amitprakash> Specifically, I want to log all mongodb queries without impacting execution times.. How can I achieve this?
[14:32:21] <Xat`> any idea why I get this error when the script use sleep() ?
[14:32:23] <Xat`> http://pastebin.com/eAyySvb8
[14:40:07] <yopp> Hum. I've got a collection with two indexes: on _id and on another field (something_id). It got 4 records. And I'm seeing this: http://pastie.org/private/4oldt2r3umt0zj7bvduta
[14:40:22] <yopp> 427ms to query a collection?
[15:21:24] <christo_m> can anyone help?
[15:25:14] <bendem> no
[15:29:28] <christo_m> perfect
[15:31:42] <christo_m> im trying to query a sub object with an _id ..
[15:32:02] <christo_m> ive read the docs , tried this: http://stackoverflow.com/questions/28665271/find-subdocument-by-id-inside-a-array-field-of-nested-object , still won't come up in results
[15:32:03] <obiwahn> Is there #mongodb-users or something? I see people joining and asking something but not many get a response
[15:35:15] <christo_m> obiwahn: true.
[15:35:24] <christo_m> i mean im just asking a basic query question , i guess that's why
[15:38:03] <symbol> christo_m: I didn't see your question, paste again?
[15:38:13] <christo_m> hello, im trying to query a subcollection.. namely, an item that has a user in it .. but when i try to do a query like { 'user._id': objectIDHERE } it fails to return
[15:38:18] <christo_m> how should i do the query? ive tried nesting it also like { user: { _id: objectIDHERE } }
[15:38:24] <symbol> obiwahn: There's a users group on google that's helpful, http://groups.google.com/group/mongodb-user/
[15:38:44] <christo_m> symbol: ^^
[15:39:07] <symbol> christo_m: Are you doing this in the shell?
[15:39:18] <christo_m> symbol: im doing this in node.. but im also trying in mongohub
[15:39:23] <christo_m> OSX client
[15:39:28] <symbol> Ok, so you're using the node.js drier?
[15:39:31] <symbol> *driver
[15:39:36] <symbol> Or are you using mongoose?
[15:39:41] <christo_m> symbol: yes :(
[15:39:50] <symbol> yes to which?
[15:40:02] <christo_m> mongoose
[15:40:04] <christo_m> sorry
[15:41:11] <symbol> christo_m: Just to be sure, are you creating the ObjectID before querying it?
[15:41:20] <christo_m> symbol: i never had to do that before..
[15:41:22] <christo_m> i could just query the ID
[15:41:29] <symbol> ObjectId = mongoose.Types.ObjectId
[15:42:35] <symbol> I don't use mongoose...checking.
[15:44:17] <symbol> It appears that Mongoose should be handling that for you. christo_m: run the same query in the shell and see if it returns any results.
[15:44:35] <symbol> christo_m: http://stackoverflow.com/questions/7878557/cant-find-documents-searching-by-objectid-using-mongoose
[15:46:24] <deathanchor> I have field called total, for the $group how do I aggregate the $sum of total into a single result?
[15:46:47] <deathanchor> if I don't specify _id it should just sum it right?
[15:47:27] <christo_m> symbol: doesn't seem to be working in console either
[15:47:28] <christo_m> trying: db.queueitems.find({'user._id': '5630ebe9d47e87d777c9c22e'}, {'user.$': true})
[15:47:51] <christo_m> that is in fact the correct id as well, can see it in mongohub
[15:49:25] <christo_m> here ill paste what it looks like: http://pastebin.com/A0fDcPRY
[15:55:35] <christo_m> symbol: ??
[16:01:39] <pokEarl> Hey Friends. so I am partially responsible for a mongoDB and am about to update a form of Schema so you can look up to see all the different fields and documents (And I guess maybe have some information about fields that might still be present but are deprecated/being phased out f.ex?) any suggestions on best way to make this so its both easy to edit/update, and easy to navigate/take in visually?
[16:22:32] <christo_m> symbol: :(
[16:22:32] <christo_m> ok
[16:22:53] <fakingfantastic_> How do you do an order_by on a field that may not be on every document?
[16:34:37] <CustosLimen> hi
[16:35:01] <CustosLimen> how much more space efficent is wiredtiger cache compared to mmap cache ?
[17:38:08] <christo_m> so can anyone here help me query a sub document
[17:38:11] <christo_m> because im not understanding
[17:38:14] <christo_m> same problem for multiple hours i guess
[18:49:58] <christo_m> i mean the query works in mongo console.
[18:50:05] <christo_m> im not sure whats left other than to complain here for hours
[18:55:09] <shlant> hi all. How should I handle permissions for mongo ssl certs? I was putting them in /etc/ssl/private, but mongo doesn't have access. Should I put the combined pem file in /etc/ssl and only give mongo read permissions?
[19:13:03] <christo_m> anyone here use mongoose?
[19:22:50] <StephenLynx> nope
[19:23:01] <StephenLynx> actually I strongly advice against it on almost every chance I have.
[19:25:19] <christo_m> I know you do.
[19:25:29] <christo_m> db.queueitems.find({'user._id': ObjectId('56311a292625f11f80e6cf4b'), 'toWatch': true}) this query seems to work in mongo console
[19:25:40] <christo_m> but when i do a mongoose query it does not
[19:39:06] <StephenLynx> well, what did you expect from mongoose? to work?
[19:39:09] <StephenLynx> v:
[19:39:51] <christo_m> LOL
[19:39:58] <christo_m> ya man
[19:45:47] <shlant> is there something different I need to do when adding a replica set member when using TLS? or still rs.add("blah")?
[19:45:57] <shlant> I'm getting "connection attempt failed"
[19:46:28] <shlant> but I can hit the hostname with dns. Does rs.add have TLS specific errors? or just the generic "connection attempt failed"
[19:51:16] <mylord> how/can I update only a subdocument value, and not run over the entire document, when doing update?
[19:52:05] <mylord> $set?
[19:52:38] <GothAlice> {$set: {'field': value}}, or, with embedded documents, {$set: {'subdocument.field': value}}, etc.
[19:53:12] <GothAlice> In fact, all of the operations effectively only modify a single field.
[20:06:49] <mylord> what are the memory and other resources costs of using a separate collection, by default?
[20:07:09] <mylord> is it normal to use 1000s of collections - 1 per client?
[20:07:17] <mylord> up to about 10k
[20:07:37] <mylord> 1 per each airline company in the world.. 1000s.. not millions like clients/users
[20:10:20] <galeto> What minimum set of indexes would ensure this query use a good plan ? (mongo 3.0) https://gist.github.com/AlexGalays/e3bd4ee9e1845fdcb062
[20:10:29] <galeto> intersecting indexes don't seem to kick in
[20:10:54] <jrdn_> is this the most optimal way of updating / inserting into an array of embedded documents? https://gist.github.com/j/1f2a4b6942d5abb16971
[20:11:11] <jrdn_> it feels weird doing that, but i don't want to create another collection for the sake of upserting... or should i?
[20:13:29] <galeto> jrdn_ : Maybe you don't need it, but that way of doing upserts is of course not fully safe. findAndModify is your best bet
[20:19:56] <jrdn_> galeto, i like living on the edge though
[20:20:31] <GothAlice> findAndModify isn't safe either, really. (Unless you memorize the documentation page for it and all of its many side-effects, and code really, really carefully.)
[20:21:17] <jrdn_> well now i want to run away, thanks GothAlice
[20:21:38] <GothAlice> jrdn_: Determining if it's optimal or not would require measurement/benchmarking, but the pattern you're using is one I frequently use, too.
[20:22:17] <GothAlice> Ref: the forums I wrote that store replies to threads that way, and these helper methods I wrote to manage the nested data: https://github.com/bravecollective/forums/blob/develop/brave/forums/component/thread/model.py#L99-L161
[20:23:13] <GothAlice> jrdn_: findAndModify is a particularly strange case. Despite needing the basic pattern of "get something, update it" and/or "update something, then get it", I've never once been forced to use findAndModify.
[20:24:39] <jrdn_> yeah, i want to say that I haven't used it either. in my case, it's (and i'm assuming right now since we're not live) not something that will be getting executed a lot.
[20:25:19] <deathanchor> findAndModify() <- worst... mongo operation... ever.
[20:26:30] <deathanchor> if you need the info. find(), if you need to update it, update(). why would you need both is beyond me.
[20:27:12] <jrdn_> well when using safe updates, doesn't it return whether the document was modified or not, and if it wasn't modified, doesn't it also say that the document was found, but not modified
[20:27:35] <jrdn_> aka in my gist, i use the result.n to check whether or not to push
[20:28:04] <galeto> you use findAndModify with the upsert option
[20:28:14] <galeto> no need to check the result
[20:29:15] <GothAlice> On the gripping hand, the vast majority of my upserts are pre-aggregation fire and forget queries.
[20:29:39] <jrdn_> yep, that's where i enjoy mongo.
[20:30:51] <jrdn_> i've never really used a ton of arrays of embedded documents, so i was lost at the minimum and most optimum efforts on adding a document to an array and making sure it's unique
[20:33:46] <deathanchor> it's fine if you have a finite model, but most people just keep piling things into a array or sub doc and then hit the doc size limit.
[20:34:43] <deathanchor> devs always blaming the previous guy for the crappy ever expanding model.
[20:36:08] <jrdn_> yeah, deathanchor we're limiting the array.
[20:36:22] <jrdn_> this is the first time i've ever done it.
[20:36:50] <jrdn_> last time i didn't do it and put it into a different collection (way easier to just move forward, btw), then people start talking about how you're an idiot for not using SQL.
[20:36:51] <jrdn_> lol
[20:42:03] <jrdn_> ps that mongoengine stuff is hard to look at GothAlice :P
[20:42:35] <GothAlice> jrdn_: Eh, yeah, but only because I'm dropping out of MongoEngine, then shoving the results back in. ;P
[20:42:43] <GothAlice> That was also quite the rush job.
[20:43:12] <GothAlice> https://github.com/marrow/task/blob/develop/marrow/task/queryset.py?ts=4#L28-L81 is a much, much prettier example of ME customization. ;)
[20:43:43] <jrdn_> yeah i had to go to the documentation to see that the operations are followed by the underscore and field
[20:44:07] <GothAlice> Indeed; I didn't duplicate that documentation. It's "Django-style". field[__subfield[…]][__operation]=value
[20:44:30] <GothAlice> It's basically just a pivot to eliminate nesting.
[20:45:15] <jrdn_> yah
[20:49:35] <GothAlice> Wow, dyslexia. [operation__] goes at the beginning. XD
[20:49:57] <GothAlice> (For updates.)
[20:52:46] <jrdn_> haha i understood ya
[22:12:57] <richard_w> i have a strange problem with document updates
[22:13:47] <richard_w> my documents have the structure {_id: "...", name: "...", values: { "key1": "val1", ... }}
[22:14:39] <richard_w> when i try to replace them with new documents the children of "values" get replicated
[22:15:01] <StephenLynx> show me your query
[22:15:03] <richard_w> like values: { "key1": "val1", "key1": "val2"}
[22:15:50] <richard_w> i am using reactivemongo in scala: "collection.update(BSONDocument("name" -> princ.name), princ)"
[22:16:22] <richard_w> princ is implicitly converted to a BSONDocument
[22:17:31] <richard_w> using "BSONDocument("_id" -> BSONObjectID(princ.id), "name" -> princ.name, "values" -> princ.values)"
[22:21:00] <StephenLynx> no idea about any of that. if you give me a query valid on the shell, I might be able to help
[22:21:10] <richard_w> well... found the problem... has nothing to do with mongodb itself...
[22:21:26] <richard_w> query is wrong and contains the duplicate elements
[22:21:49] <richard_w> thanks anyway though
[23:24:29] <tejasmanohar> what's the difference b/w findAndModify() and update()?
[23:24:42] <tejasmanohar> findAndModify is limited to 1 doc, is thati t?
[23:24:43] <tejasmanohar> *it
[23:25:00] <tejasmanohar> both seem to do arg1: find query, arg2: update query
[23:25:12] <tejasmanohar> collections#update/findAndModify, to clarify
[23:25:49] <tejasmanohar> And with the multi parameter set to true with the findAndModify query, this is identical to update() right?
[23:25:53] <tejasmanohar> Seems strange that both exist...
[23:27:56] <BurtyB> tejasmanohar, I wouldn't call them the same.. findandmodify can be used for different things than update
[23:28:27] <tejasmanohar> BurtyB: example?
[23:28:35] <tejasmanohar> what can findAndModify() do that update() can't?
[23:28:59] <tejasmanohar> also, anyone familiar w/ https://github.com/Automattic/monk ? and do you know if it exposes document#functions like save() or does it only expose collection#functions like update, find, whatnot
[23:29:38] <tejasmanohar> aha