PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 19th of July, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:34:22] <MacWinner> would data compress better in a collection if rather than storing one of the fields as large subdocument object, to store it as a string? Since I don't need to query against the sub object.
[07:09:38] <schmity> ok dumb af question. I have a mongodb collection and can console.log() the value i want, but how do i return it
[07:09:46] <schmity> like db.chatusers.findOne({ id: 'User_1235123' }, function(err, user) {if (err) throw err; console.log(user.country);}); works but return wont work
[07:18:02] <Kralian> schmity: I see no return ..
[07:19:24] <schmity> Kralian: db.chatusers.findOne({ id: 'User_1235123' }, function(err, user) { var ttt = user.country; console.log(ttt); return ttt });
[07:19:45] <schmity> same thing, will print the value but will not return it
[07:22:06] <schmity> whats the deal? this cant really be some obscenely hard task and I dont want to devolve into some callback thing
[07:28:37] <Kralian> looks like db.chatusers.findOne({q},f) eats the return value of f ..
[07:29:01] <Kralian> (I know pretty much nothing about JS ..)
[08:13:43] <ren0v0> hi, in my logs i have "building index using bulk method" over and over every few seconds, is that normal ?
[08:14:02] <joannac> are you in the middle of an index build?
[08:14:33] <ren0v0> well i just setup a new mongodb.service so i've only just started a mongo
[08:16:36] <joannac> self managed, or via a dbaas provider?
[09:49:39] <thapakazi> Hi. Anyone using rocksdb here ?
[09:50:04] <thapakazi> I mean mongorocks in production ?
[10:02:22] <kali> anybody has an opinion on which of the two rust drivers to use ?
[10:04:36] <jamiel> Hi all, just wondering if there is any workaround for adding $exists: false support to a partial index. Have tried using field: null but it seems to index *all* the records.
[10:35:01] <jamiel> Actually, it might be working with field: null, getting mixed results at the moment but might be my tests that are wrong.
[10:48:20] <k3dare> Hi all o/
[10:49:00] <k3dare> Simple question (No troll :P), what advantages MongoDB has today when compared to a PostgreSQL for document store ? I see a lot of articles saying that it doesn't have much advantages anymore.
[10:49:45] <Derick> PostGreSQL's document store does all operations on strings.
[10:50:04] <Derick> and, it being a relational database, is not nearly as each to scale.
[10:51:05] <k3dare> You mean all the JSON fields are considered as String ?
[10:51:24] <Derick> yes, perhaps not *stored* as such. But more like in and out.
[10:52:34] <kedare> Is the scaling out really reliable now ? I've heard a lot of bad stories many years ago about being unstable and hard to maintain
[10:52:41] <kedare> (Sharding mostly)
[10:54:13] <Derick> kedare: "many years ago"
[10:57:11] <kedare> Ok :)
[12:52:18] <skoude> hmm.. I'm using gson to serialize and deserialize between mongo and json.. The problem is that, I would like to have the ObjectID as just "id":"578dbe817de16d52a11bdc8d" and not like "id": {
[12:52:22] <skoude> "id": "578dbe817de16d52a11bdc8d"
[12:52:24] <skoude> },
[12:52:53] <StephenLynx> what is gson?
[12:53:49] <skoude> aah, sorry wrong channel :D
[12:54:46] <StephenLynx> kek
[14:08:22] <Fraek> Greetings I have a question on GIST https://gist.github.com/WJRovers/f7fe9460add332e3d7a462ac54b33804 which I can't quite grasp. Dont know if anyone cares to help?
[14:09:13] <Derick> Fraek: how doesn't it work?
[14:09:50] <cheeser> it doesn't partition by minute for one.
[14:10:01] <Fraek> The query itself on mongo works perfectly. It now only groups by minute. I want it to group by the user.id aswell.
[14:10:11] <Derick> oh!
[14:10:26] <Derick> you need to add it to the _id sub document then
[14:11:04] <Derick> $minute : "$date", 'userId' : "$user.id"
[14:12:14] <Derick> no...
[14:12:30] <Fraek> "errmsg" : "this object is already an operator expression, and can't be used as a document expression (at 'userId')",
[14:12:37] <Fraek> thats what Ive been getting a long time now :)
[14:12:38] <Derick> { _id: { min: { $minute : "$date" }, 'userId' : "$user.id" } }
[14:12:54] <Derick> you need to name each subkey
[14:16:17] <Fraek> Updated the GIST with the answer; thank you alot :)
[14:16:47] <Derick> I'm @derickr on GitHub :)
[14:17:37] <Fraek> Hehe changed that now :) just nice to give credits I think.
[14:18:22] <cheeser> you're grouping by $hour but calling it "min" ?
[14:19:18] <Fraek> Yeah it was something I changed for testing as my result set wasnt interesting based on minute. Didnt change the key value to gist. Changed now; thanks cheeser
[14:19:56] <cheeser> fair enough. just double checking. that's the subtle kind of thing that can waste minutes, uh, hours.
[14:23:51] <Fraek> Not sure if this is the place to discuss but your website is very blinky @Derick
[14:24:11] <Derick> blinky?
[14:24:38] <Fraek> Hovering over the pages with the mouse makes the divs with content dissapear/reapear randomly
[14:25:12] <cheeser> not for me
[14:25:13] <Fraek> Refreshing the page fixed it; lets see if I can reproduce
[14:25:17] <cheeser> on firefox or chrome
[14:25:22] <Fraek> Chrome that is
[14:26:10] <Derick> Fraek: which website/url?
[14:26:45] <Fraek> Derick: The one thats on your GitHub profile page. That would be derickrethans.nl
[14:26:55] <Fraek> Seems it was just once... weird
[15:03:46] <atbe> Hey peeps, sanity check, the number coming from this log message: 2016-07-19T10:19:59.824-0400 I NETWORK [conn9223349] end connection 10.77.9.162:39838 (7 connections now open) is this count: https://docs.mongodb.com/manual/reference/command/connPoolStats/#connPoolStats.numClientConnection
[15:04:56] <atbe> The number in this message being 7
[15:07:43] <cheeser> yes, there are 7 connections to the database open.
[15:07:51] <cheeser> you can also use mongostat to monitor/check that.
[15:40:45] <gunzl1ng3r> hi all, I've got a replica set with 3 nodes running, when restarting the machines hosting the instances, do i need to manually move the primary via "rs.stepDown()" or is this done implicitly when stopped through mongodbs init script?
[15:41:10] <cheeser> it's automatic
[15:41:35] <cheeser> though explicitly calling it allows any pending journalling/syncing to happen
[15:41:44] <cheeser> depends on how the shutdown script works.
[15:44:12] <gunzl1ng3r> it's the default init script provided by MongoDB, seems to try a "nice" kill waits for a while and then kills it hard should the process still be around
[18:56:51] <jayjo> I've converted all of my previous epoch timestames (integers) to ISODate(), so my goal is to get a unique "_p" field count for each unique month/year combination. (and eventually each month/year/day). I have a pipeline with an initial groupby, which will group everything based on the passed _id field of the $group document. Now, how do I count the unique "_p" fields? I'll submit a paste in a moment
[18:58:08] <jayjo> Actually I asked the same question here: http://stackoverflow.com/q/38357893/1556228
[18:58:56] <jayjo> This question shows some sample data, but it was for a specific range. If I want to group it initially, do I just pass in another $group document at the beginning?
[19:29:15] <jayjo> so when I run a $match document in the agg pipeline, does it only return a document with the fields i provide and accumulators?
[19:31:22] <atbe> Hey guys, what does `ASIO` stand for?
[19:32:54] <jayjo> async input output
[19:32:58] <jayjo> i believe... in c++
[20:15:16] <StephenLynx> i know a library with that name
[20:15:17] <StephenLynx> for networking
[20:17:01] <cheeser> the kernel is using that lib, i believe
[20:17:13] <cheeser> https://github.com/mongodb/mongo/tree/master/src/third_party/asio-asio-1-11-0/asio
[20:21:14] <jayjo> I think I have the query correct but now I have the error: Cannot convert from BSON type EOO to Date. https://bpaste.net/show/4b886466ee34
[20:26:55] <jayjo> Interesting. I ran db.siteEvents.find({"_t": {$not: {$type: 9}}}) and it returns nothing
[20:27:18] <cheeser> this might help: http://stackoverflow.com/questions/16194909/mongodb-cant-convert-from-bson-type-eoo-to-date
[20:27:59] <jayjo> wouldnt that find query return results if that were the case?
[20:28:43] <cheeser> not if _t were null
[20:28:47] <cheeser> apparently
[20:29:08] <cheeser> insert one document that's good. run your aggregation. if it works, great.
[20:29:31] <cheeser> if it works, insert another with a null (not missing) value for _t. rerun your agg and see if it breaks.
[21:31:48] <alexi5> hello
[22:14:05] <alexi5> do you guys know of any well know ecommerce web sites that use mongodb ?
[22:37:23] <StephenLynx> alexi5, craiglist?
[22:42:03] <alexi5> I am thinking of using mongodb for service to store package information for a wifi service as well as store invoices and provisioning settings for an internet gateway that will be provisioned upon payment
[22:42:30] <alexi5> no inventory will be managed by the system
[22:43:01] <alexi5> I think this would be a good use case for mongo given how complex package structure and provisioning commands are
[22:43:23] <alexi5> what do you guys think ?