PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 30th of August, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:56:31] <Absolome> I want to aggregate my data in a specific way, but I’m pretty new to mongo, can anyone help out? http://hastebin.com/erokuvofaf.js
[02:43:07] <MacWinne_> is there a simple way to see number of queries against a specific collection?
[02:43:35] <MacWinne_> i've removed references to a collection in my code.. just want to make sure there arent any errant processes that I missed that need it
[02:52:25] <csj> MacWinne_, https://docs.mongodb.com/manual/reference/method/db.currentOp/ , here only mentioned about specific database
[02:54:23] <csj> Hi, My colleague complained about counting a sharded collection, we tried 3 ways to count a query result: https://gist.github.com/changsijay/90261d4d4afb1c7bbf8a25efdef6db49
[02:54:53] <csj> use count() and aggregate(). but which one is correct?
[02:55:15] <csj> db.Raw.find({country:'AP'}).count()
[02:55:20] <csj> db.Raw.aggregate([{$match: {country:'AP'}},{$group:{_id: null,idCount: { $addToSet: "$_id" }}}])
[02:55:22] <MacWinne_> got it.. i set profiling level to 2
[02:55:24] <csj> db.Raw.aggregate([{$match: {country:'AP'}},{$group:{_id: null,Count:{ $sum: 1 }}}])
[03:09:13] <csj> he said that the correct one is $addToSet but very slow if the documents more than 1 billions
[07:30:33] <GothAlice> This has been a productive night.
[07:31:41] <GothAlice> https://github.com/amcgregor/WebCore-Tutorial/blob/wiki/web/app/wiki/root.py?ts=4 < have a fully functional REST interface example for managing wiki article pages in less than 100 SLoC. (There are a number of ways I can make this more compact, and yes, I'm ignoring upserts for now. ;) Tomorrow.
[07:32:56] <GothAlice> Also, interestingly, there's very little in there (other than __main__.py) that is framework-specific. ¬_¬
[10:54:20] <SimpleName> why explayin() not return the nscanned and “millis"
[10:57:20] <SimpleName> ok, need pass executionStats
[13:22:56] <sloth> does mongodb support sharding?
[13:24:02] <StephenLynx> kek
[13:24:04] <Derick> sloth: type it into google? :)
[13:24:04] <cheeser> https://docs.mongodb.com/manual/sharding/
[13:24:11] <cheeser> sloth indeed. :)
[13:24:15] <sloth> oh okay
[13:24:19] <sloth> but is it webscale?
[13:24:39] <StephenLynx> sloth's baiting, though.
[13:24:48] <cheeser> yep. moving on.
[13:24:57] <sloth> also what are the benchmarks like? are they good?
[13:25:01] <StephenLynx> unsurprisingly, I have him on ignore.
[13:25:06] <StephenLynx> but I figured it from the channel logs
[13:25:31] <sloth> (hes just mad i outed him as a dumbass in ##hardware)
[13:25:38] <Derick> sloth: stop that
[13:25:53] <cheeser> problem solved
[13:26:14] <Derick> I didn't think a +b also did a kick
[13:26:17] <StephenLynx> never been from ##hardware, though.
[13:26:27] <StephenLynx> on*
[13:26:31] <cheeser> no a kick is a separate step.
[13:26:56] <Derick> apparently it does do a mute on Freenode then.
[13:27:17] <cheeser> it does. it's a win/win really.
[13:27:42] <cheeser> if the user wants to actually learn s/he can listen but s/he can't disrupt the channel with stupid stuff
[13:29:41] <cheeser> i know that's coming in to common usage but it still feels awkward to me. i use it sometimes but still
[13:30:13] <StephenLynx> I dunno, he/she seems much less practical.
[13:30:32] <StephenLynx> is english your native language?
[13:31:48] <cheeser> oui
[13:32:09] <cheeser> which is why "he or she" is ingrained in my head because that's how i was taught growing up.
[13:32:22] <cheeser> "they" was a grammatical mistake in my formative years.
[13:32:26] <Derick> interesting
[13:32:29] <StephenLynx> weird.
[13:32:49] <Derick> it would probably also not have been okay learning English in the Netherlands
[13:32:53] <cheeser> as weird as using the plural pronoun for a singular antecdent :)
[13:33:19] <Derick> cheeser: uh, same is there for "you"
[13:33:42] <cheeser> ?
[13:34:07] <StephenLynx> indeed, I just read this http://www.oxforddictionaries.com/words/he-or-she-versus-they
[13:34:47] <StephenLynx> and it seems that usage of plural pronouns declined a while ago.
[13:34:54] <StephenLynx> and only now its coming back.
[13:35:10] <Derick> cheeser: you is also singular and plural
[13:36:19] <cheeser> yeah. but "they" hasn't been traditionally.
[13:37:17] <Derick> it did exist apparently (around the 1900s), but was discontinued for a while
[13:38:25] <Derick> or apparently much earlier too
[13:38:34] <Derick> http://blog.oxforddictionaries.com/2012/06/he-or-she-versus-they/
[14:23:51] <ankurk> I am curious is there difference between running a javascript file on mongodb (eg, ‘mongo localhost:27017/mydb queue_clicks_for_archive.js’) and executing the command straight in the mongodb for deleting old data?
[14:24:45] <cheeser> not particularly, no.
[14:43:45] <BigEntropy> Anyone have a lot of experience with casbah? I'm having trouble dealing with a list of objects, think it might be a bug. See pastbin below ...
[14:43:50] <BigEntropy> https://www.irccloud.com/pastebin/lSsTQBnu/
[14:46:56] <Naeblis> I have a deeply nested array as part of my document like so: [ { foo: Id, bar: Id }, { .. }, { ... } ]. I want to filter results and return the format so that I have all the documents matching a specific foo Id, and then group them by month (each document has a date). I've figured out the grouping part but having trouble with extracting only the desired foo-bar combination from my result
[14:47:04] <Naeblis> Any ideas?
[14:49:48] <Naeblis> could I do a $unwind and then filter out the undesired results here?
[14:52:15] <cheeser> i should think so
[14:52:52] <cheeser> a dangerous thing to claim the title Nae'blis...
[14:53:02] <Naeblis> Got the $unwind working.
[14:53:06] <Naeblis> and cheeser :-)
[14:53:33] <Naeblis> Hmm is there any way to populate references in the aggregation pipeline?
[14:54:24] <cheeser> $lookup
[15:30:43] <Naeblis> Can you combine $push with $or ? I have to put items from 2 different fields in a single accumulator
[15:31:27] <Naeblis> I tried to do a $or: [ $push: ..., $push: ...] but that just accumulated boolean true in the array
[15:32:22] <cheeser> what behavior are you expecting from that construct?
[15:35:14] <Naeblis> when one field is undefined, it should look into the other field and push that into the accumulator. So for example: "scores": { $or: [ $push: "doc.score_single", $push: "doc.score_mcq" ] } should give me the combined scores of all the single and mcq scores.
[15:37:57] <Naeblis> perhaps $cond will work here...
[15:50:48] <ohmyfromage> We have a command line application that takes command line parameters and computes some results that are stored in mongodb. does it make sense to store those input parameters with the results in mongodb or should the input parameters be stored in a different collection than the results?
[15:51:11] <StephenLynx> how large is the command?
[15:51:21] <StephenLynx> how large are the results?
[15:52:51] <ohmyfromage> StephenLynx: the command itself can be reduced to about 15 attributes
[15:53:19] <StephenLynx> 15 attributes?
[15:53:24] <StephenLynx> I'd expect it to be a string.
[15:53:24] <ohmyfromage> StephenLynx: much smaller than the results
[16:34:18] <richardsmd> ive got a mongodb instance running via the ubuntu repo at rep.mongodb.org
[16:34:19] <richardsmd> it periodically crashes and i dont see anything in the error logs. i have wiredTiger.engineConfig.cacheSizeGB limited but otherwise am using a stock mongod.conf. Can anyone suggest other settings that will either provide additional log information OR possibly eliminiate the crashes?
[16:42:21] <StephenLynx> richardsmd, use centOS 7
[16:43:12] <richardsmd> Not an option - I do not get to pick the OS of the machine
[16:44:23] <richardsmd> do you perhaps know what causes crashes in ubuntu that is mitigated by using a centos environment?
[16:44:38] <StephenLynx> nope.
[16:44:47] <StephenLynx> I just know their focus is on RHEL.
[16:44:53] <StephenLynx> and that ubuntu is ass for servers.
[16:45:01] <richardsmd> i cannot disagree with that :-/
[16:45:06] <richardsmd> but, as i said, not my choice
[16:45:13] <StephenLynx> RIP
[16:45:26] <richardsmd> you dislike debian as well, or just ubuntu?
[16:45:47] <StephenLynx> yeah, I don't like debian either. but for different reasions
[16:45:49] <StephenLynx> reasons*
[19:09:55] <n1colas> Hello
[19:56:36] <phragg> o/
[19:56:59] <phragg> anyone know a way I can ignore a type discriminator with C# + Mongo?
[19:57:23] <phragg> say the _t: "apple". but I don't have an apple class
[19:57:36] <phragg> and I don't care to know the class
[19:59:39] <GothAlice> phragg: Don't include that field in your projection?