PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 7th of December, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[04:44:01] <SaintMoriarty> I have data like so http://pastebin.com/6Sw6ZLhc, and I want to aggregate it and create a output that maybe has a month and year
[04:44:04] <SaintMoriarty> so forth
[04:44:09] <SaintMoriarty> create nesting
[04:45:10] <SaintMoriarty> I am using project to get what I have in pastbin now
[07:27:31] <KekSi> 'morning - i'm having trouble upgrading -- i have a somewhat older mongodump (from a 2.4 version) and couldn't restore it to 3.0 so i restored it to a 2.4 instance
[07:27:41] <KekSi> then upgraded to a 2.6 instance
[07:28:52] <KekSi> and after checking if all the DBs are upgradable with upgradeCheckAllDbs i tried shutting down the 2.6 and starting it up with 3.0 and i get "***aborting after invariant() failure"
[07:32:54] <KekSi> anyone had a problem like that before?
[07:35:29] <KekSi> nevermind i was being stupid.. the 2.4 and 2.6 in the docker containers ran as root (why would the official docker image run mongo as root?!) and mine doesn't
[08:21:27] <KekSi> and back with another problem.. i get "don't know what to do with file "/dump/wk.ns", skipping..." for every single file in the directory i just filled with mongodump on 3.0 with MMAPv1 and now try to restore that dump to 3.0 wiredTiger
[08:27:08] <KekSi> its a completely empty db and i'm trying to mongorestore --drop /dump .. how does it not know what to do with the files i mongodump'd with just --out about 5 minutes ago with the same 3.0.7 version..
[08:39:01] <KekSi> *facepalm* today isn't my day.. just mounting the wrong folders to the wrong endpoints :D
[08:52:07] <KekSi> nice. this is what i actually ran into: https://jira.mongodb.org/browse/TOOLS-939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&showAll=true
[08:52:22] <KekSi> downgraded tools to 3.0.6 and the restore runs fine
[08:52:27] <KekSi> -_______-
[12:25:47] <erry> um.. has anybody made a 'design' diagram for mongo collections, and if so what tool/format did you use?
[12:26:17] <erry> i want to say "these are the objects each collection will store, and these are the properties we expect"
[12:35:25] <tinyhippo> erry: like a mongodb ER diagram
[12:35:37] <tinyhippo> because they just look like normal ER diagrams
[12:39:53] <erry> mmok
[12:54:16] <erry> sort of having trouble understanding nosql.. </noob>
[12:54:41] <erry> say in SQL i'd have a many-to-many relationship between students and modules..
[12:55:04] <erry> student_id, student_name <-> student_id, module_id, grade <-> module_id, module_name
[12:55:11] <erry> in noSQL would i have like
[12:55:52] <erry> {_id, name, grades: [{module_id: 1, grade: 100}]}
[12:56:23] <Derick> erry: it depends on how you insert, update, and query this data
[12:57:01] <erry> mm
[13:17:25] <grahamlyons> Hi, I'm looking for information on the `getmore` operation; should the `cursorid` always match the `cursorid` of the initial query?
[13:17:32] <grahamlyons> Can anyone help with that?
[13:17:42] <Derick> yes
[13:17:55] <StephenLynx> kek
[13:17:57] <Derick> the initial query returns the cursor id that you need to use with getmore
[13:18:04] <Derick> that's how the server knows they belong together
[13:18:14] <grahamlyons> Thanks Derick.
[13:18:21] <grahamlyons> I thought that must be the case.
[13:18:54] <grahamlyons> However, I see `getmore` operations in my logs for which I can't find a corresponding query with the same `cursorid`.
[13:19:07] <grahamlyons> Any ideas about that?
[13:19:28] <Derick> grahamlyons: are they for replication or something?
[13:19:43] <grahamlyons> No, they're on a collection.
[13:20:32] <Derick> hmm, odd
[13:20:47] <Derick> on which collection?
[13:21:51] <grahamlyons> One of the main application ones.
[13:21:58] <Derick> hm
[13:22:06] <Derick> well, there must have been an associated query
[13:23:17] <dantix> hi, I have a collection with documents in format "document -> subarray -> subarray2" and I want to retrieve documents which match the query `db.documents.find({}, { 'subarray.subarray2': { $elemMatch: { created: { $gt: ISODate("2015-12-06T22:46:38.432Z") }} } })`. But I have an error `Cannot use $elemMatch projection on a nested field.`. How I can achieve this?
[13:23:56] <grahamlyons> OK, thanks Derick - I'll keep looking.
[15:13:46] <livcd> j:true this is related to journaling right ?
[15:16:37] <gabrielsch> Hi, I need to query this item on this inner array, how can I do that? :( https://gist.github.com/gabrielsch/c8c4a5fc7a43572a4f07#file-gistfile1-txt-L16
[15:16:53] <gabrielsch> for example, find({dropshippingMethods.methodId: 1})
[15:18:38] <joroci> hi, how do find a document by date?
[15:18:42] <joroci> do find*
[15:18:46] <joroci> oops:)
[15:18:49] <joroci> do i find
[15:19:26] <StephenLynx> you can use $gt, $gte, $lt and $lte to compare dateds
[15:20:02] <joroci> and equals?
[15:20:32] <joroci> use gte and lte
[15:20:35] <joroci> ?
[15:21:16] <StephenLynx> yes, you can also compare for equality.
[15:21:34] <joroci> how?
[15:21:44] <joroci> because { date: date} doesn't work
[15:22:31] <StephenLynx> are you sure the date matches?
[15:22:40] <StephenLynx> down to the ms?
[15:29:33] <joroci> seem to work now
[15:29:36] <joroci> weird :)
[15:33:00] <jkva> Good localtime all
[15:33:54] <jkva> When performing an aggregate $sort, what is the maximum depth when specifying a sort key? (e.g. $sort : { 'foo.0.baz' : 1 } )
[15:49:51] <StephenLynx> i dont think there is a maximum depth, jkva
[15:50:12] <jkva> StephenLynx: thank you.
[15:51:34] <jkva> I did notice a weird issue when sorting on an array value, but I found that documented on http://stackoverflow.com/a/9076983, that might explain why I am having trouble sorting on object-array-object key.
[17:20:58] <livcd> doh i can't initialize task 3 with mongoproc for final exam for m202
[17:34:35] <Captain_Haddock> How do I check the encoding used by a database or a collection?
[17:35:37] <cheeser> iirc, strings are utf-8 encoded in the database
[17:36:41] <cheeser> http://bsonspec.org/spec.html
[17:37:08] <Captain_Haddock> cheeser: Thanks.
[17:37:15] <cheeser> np
[17:47:26] <livcd> can anyone help me ? :/
[19:02:31] <rohitnsit08> hello #mongodb
[19:02:46] <rohitnsit08> is this a right place to ask mongo-scala issues?
[19:03:32] <cheeser> probably the mongodb-users list would be better. ross doesn't hang out in irc and he's hopefully offline with his family right now anyway.
[19:04:20] <allonhadaya> Is it possible to use haproxy as a tls termination proxy for external connections to a mongodb server?
[19:04:44] <rohitnsit08> @cheeser , thanks I'll use that..
[21:17:10] <Rashad> Hello.
[21:17:40] <Rashad> I have users that sign up using fb, so therefore their fb user id is unique.
[21:17:50] <Rashad> I want to store the users in the database.
[21:17:58] <Rashad> Do I name the documents with the fb user id?
[21:18:10] <Rashad> Or are there better alternatives?
[21:18:17] <StephenLynx> what do you mean to name documents
[21:19:20] <Rashad> Each document is a bunch of key-value pairs.
[21:19:50] <StephenLynx> not really.
[21:19:54] <Rashad> I am trying to follow this: http://mongoosejs.com/docs/index.html and "silence" would be a name for a document.
[21:20:04] <Rashad> (or a "name" for the user)
[21:20:04] <StephenLynx> you shouldnt use mongoose.
[21:20:59] <Rashad> Why not?
[21:21:19] <StephenLynx> 1: its slow
[21:21:29] <StephenLynx> 2: it doesn;t handle dates and _id properly
[21:21:41] <StephenLynx> 3: its buggy
[21:21:52] <Rashad> What should I use instead?
[21:22:05] <StephenLynx> http://mongodb.github.io/node-mongodb-native/2.0/api/
[21:24:48] <Rashad> I am confused now.
[21:25:11] <Rashad> Would you care I tell you the scenario I'll be using the db for and maybe you can help me decide?
[21:25:21] <StephenLynx> sure
[21:26:11] <Rashad> Well it's a chat application where you sign up using fb.
[21:26:54] <Rashad> Basically I want to store users and how they use the application (statistics).
[21:27:51] <StephenLynx> ok.
[21:27:57] <StephenLynx> what is your doubt?
[21:28:57] <Rashad> Why is mongoose wrong...
[21:29:04] <StephenLynx> I just told you.
[21:29:17] <StephenLynx> it is slow, bugged and doesn't handle certain scenarios properly.
[21:29:22] <Rashad> How does it not handle dates properly and what is _id?
[21:29:28] <Rashad> And how is it buggy?
[21:29:35] <StephenLynx> _id is the unique id that is generated by default for every document.
[21:29:49] <StephenLynx> it can be up to 6 times slower than the native driver.
[21:30:20] <StephenLynx> it will retrieve dates in the wrong format.
[21:30:33] <StephenLynx> the whole thing is just a mess that offers you nothing.
[21:30:50] <StephenLynx> I have been using node with mongo for over a year now.
[21:31:06] <StephenLynx> I have never seen a single reason to use mongoose instead of the native driver directly.
[21:32:45] <Rashad> OK.
[21:32:55] <Rashad> Is this opinion popular or just yours?
[21:33:06] <StephenLynx> pretty popular.
[21:33:21] <StephenLynx> none of the experienced users here use it.
[21:33:44] <StephenLynx> the most experienced user here says it is pretty much the worst software around.
[21:33:51] <cheeser> <blink>uh...</blink>
[21:34:06] <Rashad> Hello.
[21:34:08] <cheeser> you're the only one espousing hate on it on a regular basis.
[21:34:14] <StephenLynx> not really.
[21:34:26] <StephenLynx> alice also says it is as bad as it gets.
[21:34:41] <Rashad> Who's the most experienced user?
[21:34:46] <StephenLynx> alice, imo.
[21:35:03] <cheeser> probably, yeah.
[21:35:18] <cheeser> i don't use js at all so i can't really comment on mongoose's suitability
[21:35:27] <Rashad> Aha.
[21:35:34] <StephenLynx> the performance alone is reason for one to now use it.
[21:35:38] <cheeser> js is a code smell in general.
[21:35:46] <StephenLynx> to not*
[21:36:01] <cheeser> but with something like js, i'm not sure there's a *lot* to gain with an ODM
[21:36:14] <StephenLynx> that too, ODMs are pointless in js.
[21:36:36] <Rashad> Where can I find someone comparing performance?
[21:37:27] <Rashad> ODM = ?
[21:37:35] <StephenLynx> http://codeandcodes.com/tag/mongoose-vs-mongodb-native/
[21:37:45] <StephenLynx> object document mapper
[21:38:32] <StephenLynx> mongoose is the PHP of node environment, imo.
[21:40:41] <StephenLynx> but the most important question one should ask is: why do I need it? as a rule of thumb, more dependencies mean more problems. so what do you get in exchange of having these additional problems?
[21:41:01] <Rashad> Simpler syntax?
[21:41:06] <StephenLynx> is the same.
[21:41:31] <StephenLynx> have you tried the native driver?
[21:41:34] <StephenLynx> it is as simple as it gets.
[21:43:08] <Rashad> Is there a getting started anywhere?
[21:43:18] <StephenLynx> hm, let me see.
[21:43:39] <StephenLynx> http://blog.modulus.io/mongodb-tutorial
[21:44:01] <StephenLynx> but the most useful resource is the documentation I linked.
[21:44:23] <Rashad> OK.
[21:45:18] <Rashad> OK this is simple enough for me: https://docs.mongodb.org/getting-started/node/insert/
[21:46:38] <StephenLynx> yeah, that seems good.
[21:49:58] <SaintMoriarty> Hi
[21:51:06] <Rashad> Hey SaintMoriarty
[21:51:18] <SaintMoriarty> I am seeking some help with aggregation
[21:58:40] <SaintMoriarty> anything?
[22:00:14] <cheeser> you never asked a question
[22:00:18] <SaintMoriarty> lol
[22:00:56] <SaintMoriarty> let me pastern it
[22:01:07] <SaintMoriarty> I think i hit exit instead of send
[22:01:53] <SaintMoriarty> http://pastebin.com/yH8L418N
[22:03:34] <SaintMoriarty> I would like it so my output object have all the reasons and counts grouped underneath the month/date
[22:03:41] <SaintMoriarty> if that makes sense
[22:07:26] <SaintMoriarty> cheeser, ?
[22:54:41] <sector_0> where's a good place to start learning about mongodb?
[22:57:24] <cheeser> https://university.mongodb.com/
[23:10:49] <jayjo> I'm writing a little toy blog with flask & mongodb. I want to write posts in markdown (and hopefully, eventually, do something like SO where I can see the edits in real-time). Is there a cost or benefit to storing the documents in the db, vs the filesystem and having flask serve them?