PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 12th of January, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[04:49:49] <rk18> Hello
[04:50:25] <rk18> Hello, I am making my first MongoDB app with express.js and node.js
[04:51:30] <rk18> my problem is: i use the find method to retrieve a particular value from the database, and when i convert the cursor to an array and pass a callback function, i try to save the result in a global variable
[04:52:01] <rk18> however, when i console.log the global variable, the value of the variable that i assigned a value from the database to shows up as undefined.
[04:52:25] <rk18> any suggestions on what could be wrong? I console log outside of the .find method callback function
[04:55:15] <Boomtime> @rk18: this is in node.js? it sounds like you have a concurrency problem - the find probably hasn't completed at the time you check your global variable
[04:55:45] <rk18> yes it's inside node
[04:55:54] <rk18> that could be the case
[04:56:35] <rk18> i noticed the console of the global variables value occurs first before the console logs inside the callback, even though i check the value of the variable outside of the callback
[04:57:33] <rk18> here is the code:
[04:57:36] <rk18> _nextCounterVal = _counters.find({name:"main"}).toArray(function(err,db) { if (err) throw err; console.log('here is the damn d.b', db,db.value,db[0].value); res.send(db[0].value); }); console.log("counter val", _nextCounterVal);
[04:58:52] <Boomtime> @rk18: node is event driven, you don't issue commands directly, you 'stack up' things you want done and the callback function is called when that task completes - what would be the point of the callback if the operation was complete immediately?
[04:59:24] <Boomtime> please note, this isn't mongodb related - you are learning node.js by the solunds of it
[08:17:44] <m3t4lukas> hey guys :) I wanted to ask whether anyone of you already did a mongodb connector for postfix and dovecot?
[08:23:47] <m3t4lukas> it seems to be more complicated since db_common is not really made for working with anything else but SQL.
[08:29:34] <m3t4lukas> but what needs to be done needs to be done. It can't be that there is no such thing like no mails stored in mongodb :P
[08:30:24] <m3t4lukas> *that there is no such thing like storing mails in mongodb
[10:53:01] <themroc> hi, i guess you already know that the packages signatures are invalid on the debian repository at http://repo.mongodb.org/apt/debian/dists/wheezy/mongodb-org/stable/ ?
[11:04:07] <themroc> ah yes that's https://jira.mongodb.org/browse/SERVER-22144 ; packages signatures were fine yesterday before the release of 3.2.1, so i guess this is related to the release of the new version.
[11:47:11] <aps> I'm really disappointed with recent MongoDB releases. Normally, one would hope that upgrading a package would make it better. It gets worse in this case. I upgraded my prod mongo servers from 3.0.8 to 3.2 and all hell broke loose.
[11:47:27] <Derick> what broke?
[11:47:56] <aps> In one replica-set, mongo 3.2 keeps crashing due to OOM every few hours - https://jira.mongodb.org/browse/SERVER-22000
[11:48:44] <StephenLynx> afaik, unless you manually move your db to WT, it keeps using the previous engine it was using.
[11:49:12] <aps> storage engine was already wiredTiger
[11:49:38] <StephenLynx> ok then
[11:50:26] <aps> In other replica-set, I just added a secondary of version 3.2 to a replica set running 3.0.8. It sky-rocketed the "number of connections".
[11:51:42] <aps> Right most is Mongo 3.2. Second one is primary member. https://usercontent.irccloud-cdn.com/file/RHaLSR04/Screen%20Shot%202016-01-12%20at%205.14.17%20PM.png
[12:05:55] <lipiec> after upgrading from 3.0 to 3.2 in logs i've seen following information:
[12:05:56] <lipiec> 2016-01-12T10:25:41.264+0100 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/var/lib/mongod_cache/diagnostic.data'
[12:06:17] <lipiec> what's in that directory? how can i read those binary files inside?
[12:06:50] <StephenLynx> is it coincidence this many people upgraded to 3.2 recently or something happened?
[12:08:18] <lipiec> StephenLynx: I'm just trying to keep up-to-date.
[12:08:26] <StephenLynx> I know
[12:08:38] <StephenLynx> is that you are like, the third person that updated today and got issues.
[12:08:46] <Derick> StephenLynx: 3.2.1 came out yesterday
[12:08:50] <StephenLynx> while 3.2 has been out for a month or so
[12:09:14] <StephenLynx> both aps and lipiec upgraded from 3.0.8
[12:09:20] <StephenLynx> or 3.0.x
[12:09:29] <StephenLynx> the coincidence just struck me
[12:09:53] <StephenLynx> like, is there any repository that was stuck to 3.0 until now?
[12:10:05] <lipiec> StephenLynx: It's not an issue... It's just a diagnostic information.
[12:10:23] <StephenLynx> what you didnt had before.
[12:10:28] <lipiec> But I'm just curious what's inside those files.
[12:11:00] <lipiec> StephenLynx: OK. I can agree to that. It's something new.
[12:11:10] <lipiec> And I can't find any info in docs about that.
[12:11:54] <aps> I was asked to upload my diagnostic.data to the ticket I filed. I find it weird that I couldn't even see exactly what data I am uploading.
[12:12:37] <lipiec> StephenLynx: But main reason to upgrade was ability to do partial indexes (lots of space can be saved with that feature).
[12:12:55] <lipiec> aps: yeah, it's because they are binary files...
[12:13:16] <lipiec> aps: maybe there is some tool from mongo-org-tools or command in mongo shell to read this?
[12:14:34] <aps> lipiec: I asked around for that, but I was told there's no such publicly available tool. Again weird.
[12:14:55] <Derick> lipiec: https://docs.mongodb.org/manual/release-notes/3.2/#diagnostic-data-capture
[12:16:04] <Derick> looks like some protobuffer file... thingy
[12:17:11] <lipiec> Derick: thanks thanks for that, my fault not to search by search on docs site but only with google...
[12:17:25] <Derick> i did use google ;-)
[12:17:30] <lipiec> damn!
[12:17:34] <Derick> anyway, asking our support team what to do with this
[12:17:44] <Derick> mongodb "diagnostic.data" -- second hit
[12:19:35] <lipiec> Derick: strange, maybe it's because of i'm using polish version of google? https://www.google.pl/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=mongodb+%22diagnostic.data%22
[12:20:09] <lipiec> Derick: cause there is no info about docs page in results
[12:20:19] <lipiec> only some issues from jira
[12:20:55] <lipiec> Anyway, in docs it's said that data are written every second.
[12:22:00] <lipiec> Much curious, what influence could it make on some heavy running machine
[12:31:32] <lipiec> aps: what i've found by myself that those files are bson valid documents, you can read them with bsondump utility
[12:32:06] <lipiec> aps: but i can't read what's inside those objects... cause they are some like encrypted...
[12:35:00] <aps> okay
[12:35:56] <lipiec> or just compressed: https://jira.mongodb.org/browse/SERVER-19583
[12:35:58] <lipiec> ;)
[15:22:11] <saira_123> hi boys i want to do a research on mongodb 3.0 performance to write a research paper . can someone guide me what metrics should i use for performance ? any research paper i can refer to?
[15:42:32] <Waitak> It's really tempting to just answer with this: http://bfy.tw/3giG
[15:43:06] <Waitak> (Sorry, I just couldn't resist.)
[15:43:28] <metame> Waitak: +1
[15:43:43] <metame> saira_123: but a few places to start
[15:43:50] <metame> saira_123: https://docs.mongodb.org/v3.0/administration/analyzing-mongodb-performance/
[15:43:58] <metame> saira_123: https://www.mongodb.com/white-papers
[15:44:55] <metame> saira_123: also just as a friendly aside, it may not be taken well addressing an anonymous group of tech professionals as 'boys'
[15:45:22] <metame> (that is, for the gender-specificity)
[16:07:38] <saira_123> metame bundle of thanks
[16:09:31] <magicantler> -/join node.js
[16:10:47] <saira_123> Waitak thanks , actually i am looking for an academic research instead of search
[16:12:18] <jetole> Hi guys. I am using db.grantRolesToUser() and than db.getUser("userName") and after I see the permissions in getUser() and than a moment later when I re-run it, the permissions are gone. Can anyone please help?
[16:12:37] <Waitak> saira_123: That's fair. How about this, then? http://bit.ly/22XADPL
[16:14:59] <Waitak> saira_123: One nice technique is to find an earlier article that's in the ballpark, and to look for others that cite it.
[16:15:53] <saira_123> Waitak thanks i am checking "Performance Evaluations of Document-Oriented Databases Using GPU and Cache Structure"
[16:16:12] <Waitak> saira_123: Good luck!
[16:16:15] <saira_123> Waitak my problem is the machines i am going to evaluate performance on has Solaris and ZFS filesystem
[16:16:32] <saira_123> Waitak and i have heard mongodb doesn't work well with ZFS and Solaris
[16:17:29] <Waitak> saira_123: Well, if you're in new territory, the answer might just be to design the experiment yourself.
[16:18:24] <saira_123> Waitak Thanks Sir
[16:19:32] <Waitak> saira_123: My pleasure. If your focus is Solaris and ZFS, perhaps you could start with some of the literature on other sorts of performance testing on that platform, and see if you can apply it to testing MongoDB.
[16:20:23] <saira_123> Waitak yeah actually that won't be an apple to apple comparison ,
[16:20:33] <saira_123> Waitak my focus is Mongo
[16:21:48] <Waitak> saira_123: Yes, but performance in a database is all about minimizing disk accesses - particularly avoiding seeks. Performance testing in *any* database, relational or not, boils down to how well you're managing disk access.
[16:22:43] <saira_123> Waitak correct and with mongo this means how well we are managing different types of disk cache like arc cache and page cache
[16:22:50] <Waitak> saira_123: If you have a clear understanding of the idiosyncrasies of ZFS on Solaris regarding general IO-centric performance, you ought to be able to apply that to MongoDB.
[16:24:47] <saira_123> Waitak thanks that not my strong area , yes i will also check on it
[16:25:57] <Waitak> saira_123: I'd focus on that first. (As an aside, I haven't had many conversations like this since I was in academia, which has been a while. This is quite enjoyable.)
[16:26:51] <saira_123> Waitak thanks for your guidance
[16:27:56] <Waitak> saira_123: My pleasure.
[16:56:07] <the_voice_> Am I right in my understanding that dot notation with the $ is only for the update query
[16:56:23] <the_voice_> and that you can have regular dot notation in the find(when you are looking for objects inside an array)
[16:56:41] <cheeser> yes
[16:56:48] <the_voice_> Great
[16:56:50] <the_voice_> thanks
[17:00:22] <saira_123> Hi Technical professionals if someone is testing mongodb performance , is there any free or 10gen provided server resources where one can test performance freely?
[17:06:14] <cheeser> saira_123: nothing from mongodb, no.
[17:14:45] <magicantler> when i --fork mongos, i'm finding that shell control is not being returned. is there a good workaround?
[17:14:50] <magicantler> --fork works fine for mongod.
[17:30:48] <cheeser> mongos --fork &
[17:39:04] <saira_123> hi professionals , i just finished reading a whitepaper on mongo website ,Comparing Couchbase Server 3.0.2 with MongoDB 3.0
[17:39:06] <saira_123> I feel author did not fairly compared with Mongo, with 9 active Couchbase nodes he only used 3 active Mongod primaries
[17:44:31] <saira_123> I feel i can improve this white paper by using different mongo architecture, but i dont have server (hardware) resources
[17:53:08] <Waheedi> try always to fit yourself with what you have saira_123
[18:04:33] <saira_123> :)
[18:07:37] <blizzow> I have three mongo config servers in a sharded replicated cluster. When one of my configs goes down (for upgrade), many of my mongos servers start to wig out and take forever to connect to mongo. I'm assuming mongos is somehow setting a preference to which config server it should connect to. A) am I correct in this assumption? B) How do I get mongos to start querying a different config server faster?
[18:09:35] <saira_123> blizzow the other mongos must be just complaining about the absence of 1 config server but should be performing faster as before
[18:09:46] <idd2d> If I have the following schema, how would I query for the user IDs within a group? http://hastebin.com/avahuhizid.json
[18:10:39] <saira_123> idd2d something like
[18:11:04] <saira_123> db.collection.users.id
[18:13:16] <saira_123> db.collection.find("users.id": 12)
[18:14:47] <idd2d> saira_123: that doesn't seem to work
[18:14:53] <idd2d> Are you sure it doesn't involve the $ operator
[18:15:04] <idd2d> Seeing as we're querying against an array of sub-documents?
[18:20:51] <metame> idd2d: you can use dot notation
[18:21:18] <metame> like saira_123 did
[18:21:46] <metame> "users" references the users field and "id" is the field within the user doc
[18:22:17] <metame> so db.collection.find("users.id":"abc") would return your example doc
[18:23:56] <pamp> db.collection.find({"users.id":"abc"})
[18:45:58] <mapc> hi
[18:46:16] <mapc> does anybody know whether it is possible to share cursors between clients?
[18:47:04] <mapc> when I try it, I get an error "already in use", so I figure mongo uses no internal locking for cursors
[18:47:59] <mapc> but is there really no way to do it?
[18:50:29] <cheeser> mapc: it is not.
[18:51:36] <mapc> cheeser: It seems it might be possible if I do my own locking
[18:52:25] <mapc> I just started around ~100 process trying to read from the same cursor and a couple of them got data
[18:52:42] <mapc> but now I am unsure whether this is horribly unsupported and whether my app will break in two weeks :)
[18:53:05] <cheeser> so it's not about sharing between clients. it's about sharing a client/cursor among threads.
[18:53:16] <cheeser> that's a "simple" threading/locking problem then
[18:53:47] <mapc> cheeser: well I am in python and the goal is to use multi threading, so I can't use threads
[18:53:57] <mapc> If I could use proper threads this would be so easy
[18:54:40] <cheeser> can't help you there. It'd be trivial in java if you feel like rewriting your entire application. :D
[18:55:02] <mapc> So I actually need to opem multiple mongo connections, but of course I still can do locking to ensure only one client at a time does access
[18:55:29] <mapc> cheeser: The first stage of the processing I do wasin C++ and that seems outright simple :D
[18:56:02] <mapc> but yeah, is it defined behaviour to access the cursor from multiple clients, doing my own locking?
[18:58:22] <cheeser> what do you mean by "client?" because to me that means a MongoClient
[18:58:31] <mapc> well, let's say, connection
[18:58:41] <cheeser> you dont' want to do that.
[18:58:47] <mapc> I open an individual database connection, possibly from multiple hosts
[18:59:06] <cheeser> you want one cursor and then serialize access to that cursor between threads/workers
[19:00:16] <mapc> there, that was the sound of my abstraction layers going out the window.
[19:00:22] <cheeser> :)
[19:00:22] <mapc> cheeser: Thanks for the adivse :)
[19:00:42] <cheeser> they're probably close. you're just abstracting a layer too low it sounds
[19:03:04] <mapc> well, I am using mongoengine; the hacking required stuff a different cursor ID into Mongoengine queries is probably less than replacing the entire serialization layer
[19:05:58] <cheeser> you only need the one cursor. one iterator. just multiple consumers.
[19:06:42] <mapc> yeah
[19:07:00] <mapc> thanks for the advise
[19:07:31] <cheeser> np
[19:26:34] <sweettea> where is a common place to put a replication keyfile?
[19:34:39] <sweettea> i put in the default homedir created when installing via yum install mongodb-org when using repos from mongo:
[19:34:42] <sweettea> mongod:x:498:499:mongod:/var/lib/mongo:/bin/false
[19:37:43] <cheeser> "default homedir?"
[19:59:54] <mparm920> Hi I am trying to repair a corrupted database. Upon starting the database I am getting this error 'WiredTiger.turtle: encountered an illegal file format or internal value' I have tried mongod --repair a few different ways and wiretiger wt salvage and help would be apprciated
[20:09:56] <mapc> ls
[20:10:01] <mapc> (sry)
[20:10:09] <mapc> cheeser: just in case you
[20:10:56] <mapc> are interested: python serializing & deserializing actually needs more CPU than the processing I am doing. Thanks pythong :D
[20:14:25] <cheeser> there's always java. ;)
[20:14:41] <mapc> or c++...
[20:19:57] <sweettea> cheeser: yep
[20:21:52] <sweettea> hmm, ive accidentally made two primaries in a replication set
[20:25:27] <sweettea> rs.stepdown() did not work, how to force a box to be secondary?
[21:06:36] <GothAlice> https://jira.mongodb.org/browse/SERVER-15815 T_T Keeps getting bumped. So sads. 2.6 → 2.9 → Backlog'd → 3.3 → Reschedule.
[21:08:40] <GothAlice> mapc: If you're careful in your BSON document construction, you can map BSON blobs directly to packed C structures and avoid deserialization completely. :P
[21:09:00] <GothAlice> "Deserialize" becomes "pointer dereference with a cast". :P
[21:10:11] <mapc> GothAlice: thank you for that hint! that could be very useful
[21:10:31] <GothAlice> Er, not advised, but technically possible. Just avoid variable-sized types, or only have the last element variable sized. :P
[21:11:24] <mapc> GothAlice: Interestingly, my application is conversion from Dbase, so I can in general arange a fixed size, because my input data is entirely fixed size
[21:11:51] <mapc> any idea whether this is possible the other way around? My application spends most of it's time encodeing bson
[21:12:44] <GothAlice> Ah, MongoDB doesn't have a CHAR type, only variable-length (often Pascal-style length prefixed) UTF-8 strings. If any of your data is text, fixed sizes across the board becomes much harder to manage without explicit padding.
[21:12:45] <mapc> or at least the C++ part does that most of the time
[21:13:09] <mapc> GothAlice: I could do padding ^^
[21:13:17] <GothAlice> It's still very eew. XP
[21:14:13] <mapc> GothAlice: true. I used rapidjson for some time, but then I moved to mongocxx. My applicating suddenly took 10x as much time :(
[21:14:41] <mapc> (or bsoncxx to be precise)
[22:18:54] <Waheedi> db.collection.ensureIndex for replicasets
[22:19:06] <Waheedi> If i execute the above on primary would secondaries sync?
[22:19:20] <Waheedi> or I need to do it on all mongos
[22:32:19] <lipiec> Waheedi: index will be replicated
[22:32:58] <cheeser> you only ever write to a primary. all changes are replicated.
[22:34:28] <Waheedi> thanks lipiec
[22:34:44] <Waheedi> yeah I know that but I thought indexes have a different scenario
[22:36:10] <Waheedi> How can i rebuild indexes?
[22:37:38] <metame> Waheedi: rebuild indexes?
[22:37:51] <Waheedi> metame: yes
[22:38:15] <Waheedi> metame: https://docs.mongodb.org/manual/tutorial/build-indexes-on-replica-sets/#build-the-index
[22:38:25] <Waheedi> second line says rebuild
[22:38:35] <cbx33> Hi all, need a little help with aggregate, I have a number of records that have identical "name" fields, and they have a "status" field. What I want to return is the latest, there is a "finish_time" field, record for each unique "name"
[22:38:47] <cbx33> is that possible
[22:39:41] <cbx33> si imagine two records {'name': 'a', 'status': 'failed', 'finish_time': '3'} {'name': 'b', 'status': 'failed', 'finish_time': '4'}
[22:40:06] <Waheedi> yeah it seems ensureIndex does exactly that rebuild I was thinking of
[22:40:07] <Waheedi> :)
[22:40:10] <Waheedi> thanks again
[22:40:12] <cbx33> ahhh i screwed up
[22:40:16] <cbx33> the 'b' should be 'a'
[22:40:20] <cbx33> so they have the same name
[22:40:27] <metame> Waheedi: ya so same syntax as creating
[22:40:40] <cbx33> can anyone help me with this....I'm thinking I need aggregate
[22:40:54] <cbx33> I've gotten the $match and $sort
[22:41:03] <Waheedi> yup
[22:41:04] <cbx33> but can't get it to basically perform a distinct
[22:41:06] <metame> Waheedi: also remember ensureIndex was deprecated in 3.0. Should be using createIndex if >3.0
[22:41:21] <Waheedi> no I'm still on the earlier versions :)
[22:41:35] <Waheedi> considering upgrading soon though
[22:41:45] <metame> Waheedi: just making sure
[22:41:53] <Waheedi> thanks metame
[22:48:00] <metame> cbx33: you actually just need a $group
[22:48:21] <cbx33> metame, i wondered......but i need it to return the latest object with ALL it's fields
[22:48:23] <cbx33> is that possible
[22:49:11] <cbx33> metame, I have a search in there as I want all records where status != 'passed'
[22:49:15] <cbx33> as well
[22:49:24] <cbx33> search = $match
[22:49:26] <cbx33> sorry
[22:49:52] <cbx33> think you can help me figure out the aggregate pipeline?
[22:50:19] <metame> no worries. so you can use a group after your $match
[22:51:31] <cbx33> right
[22:51:35] <cbx33> but what should the syntax be
[22:51:42] <cbx33> I'm still getting to grips with it
[22:51:46] <cbx33> I've seen stuff like this
[22:51:51] <cbx33> {"$group": {"_id": "$name"}}
[22:52:02] <cbx33> but that only returns me the name
[22:52:10] <cbx33> as _id
[22:52:17] <cbx33> which is not what I want ;)
[22:53:54] <metame> yep, then just add , "finish":{"$max":"$finish_time"}
[22:54:12] <cbx33> which will get me the finish time
[22:54:19] <cbx33> but what about the other fields in the objects?
[22:54:29] <cbx33> I simplified the object so I could explain it better
[22:54:35] <metame> the highest time
[22:54:41] <cbx33> right
[22:57:22] <cbx33> metame, seems like $last could do it, as I've sorted them
[22:58:55] <metame> do a -1 sort on finish time then use $first
[22:59:04] <cbx33> is that faster?
[23:00:08] <metame> unless you have an index on finish time you should just skip the sort and use max
[23:00:23] <metame> and $first should be faster than $last
[23:00:37] <cbx33> i don't have an index on it
[23:00:42] <cbx33> but
[23:00:55] <cbx33> the other values I need from the objects will need to be $last also
[23:01:04] <cbx33> or "first"
[23:04:20] <metame> as in you're aggregation is going to end up with multiple fields taking the max/min of different fields from your original schema
[23:04:30] <cbx33> yes
[23:04:51] <cbx33> which is why I wondered if there was a way to return the "first/last" object as a whole
[23:04:57] <cbx33> in the group
[23:05:05] <metame> then skip sort and add all of those to your $group
[23:05:34] <metame> you can do all of it in a single $group
[23:05:39] <cbx33> true
[23:05:41] <cbx33> but
[23:05:54] <cbx33> $first won't work unless the data is ordered
[23:05:58] <cbx33> according to the docs
[23:06:05] <cbx33> which requires the sort
[23:06:18] <metame> you dont need first. just use max
[23:06:31] <cbx33> max is only relevant for finish_time
[23:06:40] <cbx33> I have other text fields where it's not relevant
[23:06:59] <metame> example?
[23:07:30] <cbx33> so basically each of these records is exactly that
[23:07:39] <cbx33> I want to return the fields of the "record" who is last
[23:07:49] <cbx33> if I do "max" over each field individually
[23:07:56] <cbx33> it will return me the max of each field over the group
[23:08:16] <cbx33> that's not right.....the only field that should be used to "sort" is the finish_time
[23:08:27] <cbx33> and then I want to grab all the other fields from that particular record
[23:08:41] <cbx33> metame, make sense or should I pastebin some more example data
[23:09:00] <metame> makes sense
[23:09:20] <cbx33> so that's ding the sort....and then the $first/$last works for me
[23:09:26] <cbx33> but is probably inefficient
[23:09:29] <metame> so you do want to do $match, $sort, then $group
[23:09:36] <cbx33> right
[23:09:52] <cbx33> but that group.....it's a pain I have to reconstruct my object again
[23:09:55] <metame> just do your sort as finish_time: -1
[23:10:18] <metame> then use $first for each of the fields that you need
[23:10:27] <cbx33> metame, ok......that's the only way?
[23:10:32] <metame> won't be inefficient really
[23:10:35] <cbx33> the more fields = the slower the search?
[23:10:39] <cbx33> ok
[23:10:41] <cbx33> thanks
[23:11:03] <cbx33> this has been most helpful
[23:11:05] <metame> no, all you're doing at that point is grabbing the first document in memory
[23:11:12] <cbx33> oh yeh
[23:11:18] <cbx33> i guess...and then querying it for a field
[23:11:22] <cbx33> true true
[23:11:40] <metame> yep, so aggregation is all in memory of course
[23:12:16] <cbx33> this is great!
[23:12:26] <cbx33> thanks metame - so much faster than the original way
[23:12:29] <metame> you're doing a $match, then $sort, then $group and grabbing all the fields for the $first doc in that group
[23:12:37] <cbx33> yes
[23:12:47] <cbx33> except I have to explicitly list the fields
[23:12:49] <metame> should work great
[23:12:58] <cbx33> but apart from that....we're golden :)
[23:13:25] <metame> cbx33: right since $group reconstructs a new doc from each group match
[23:13:32] <cbx33> yeh
[23:13:41] <metame> cbx33: good luck!
[23:13:44] <cbx33> if only there was some kind of doc copy ;)
[23:13:51] <cbx33> metame, it's been awesome
[23:13:57] <cbx33> thanks so much for the help here
[23:14:08] <cbx33> can't believe how much faster this is going to be
[23:14:57] <metame> cbx33: aggregation pipeline is pretty sweet when you get the hang of it
[23:15:02] <cbx33> yup
[23:15:14] <cbx33> it was basically validating that I had to reconstruct the object
[23:15:20] <cbx33> and finding the $first/$last
[23:28:24] <cbx33> metame, that {"$group": {"_id": "$name", "finish_time": {"$first": "$finish_time"}}} will group by the "name" field right?
[23:28:52] <cheeser> yes
[23:29:01] <cbx33> awesome thanks cheeser
[23:31:08] <metame> cbx33: the "_id" field in a $group is called the $group key
[23:31:36] <metame> that helps me remember what it does anyway
[23:31:38] <cbx33> ok
[23:31:40] <cbx33> thanks