PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 17th of July, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:46:44] <GoClick> Would MongoDB be a reasonable choice for an application that needs to store 2-7m entries, each with 10-20 fields which change all the darn time, but not exceeding 1kB each, and for which writes are done very frequently and reads maybe only once a week but reads would hit almost all entires?
[01:48:38] <GoClick> Maybe the best analogy I could give would be a web server logging headers sent by clients which you'd want to run reports on later…
[03:36:38] <circlicious> another use going aay from mongo - http://metabroadcast.com/blog/looking-with-cassandra-into-the-future-of-atlas :/
[03:36:46] <circlicious> user going away
[03:57:37] <unomi> Hi - within an update() is there a reference to the current object?
[03:58:36] <unomi> I see there is someArray.$.arrayitemAttribute
[04:08:34] <unomi> I currently have: db.users.update({_id:ObjectId(user_id)}, {$set:{"stats.deckCount": db.decks.count({user:ObjectId(user_id)})}},false,true);
[04:09:56] <unomi> but I would like to be able to rewrite it for 'true' multi-update where the user._id of the currently matched user can be referenced
[04:32:55] <tiripamwe> hi guys, is the entire javascript language available within mongo or is only a subset available?
[04:33:14] <tiripamwe> if it's only a subset where can i find details about what that subset is?
[04:53:49] <ranman> tiripamwe: it's spidermonkey engine
[04:54:04] <ranman> tiripamwe: but someparts aren't there -- not exactly sure where that info is
[04:59:03] <tiripamwe> ranman: thanks,
[05:08:04] <tiripamwe> ranman: i'm using MapReduce... if i want to define a function is there somewhere other than the map or reduce function to define it?
[05:08:22] <tiripamwe> ranman: it seems wrong to put them there...
[05:08:47] <ranman> var someVariable = new function(arguments) { }
[05:08:50] <ranman> or something like that?
[05:09:09] <ranman> you can also pass in javascript files to the shell
[05:09:10] <tiripamwe> yes
[05:09:59] <tiripamwe> i'm working from the python client?
[05:57:05] <ranman> ? err it should have something for map reduce
[05:57:44] <ranman> tiripamwe: http://api.mongodb.org/python/2.0/examples/map_reduce.html
[05:58:59] <tiripamwe> ranman: thanks for the link, i have just put together a very ugly hack that looks like its working...
[05:59:06] <ranman> alright
[05:59:11] <tiripamwe> ranman: need to run it through some tests though
[05:59:26] <ranman> sorry I wasn't particularly punctual
[06:00:25] <tiripamwe> ranman: your help is much appreciated
[06:00:56] <ranman> no worries man
[07:38:12] <[AD]Turbo> hi there
[07:38:51] <ranman> hello
[07:46:04] <exi> hi
[07:46:58] <exi> i just have a small question. if i accidentaly started removing the wrong shard, is there any way to stop the draining revoke the removeshard command?
[07:47:15] <exi> +and
[07:49:03] <NodeX> I think you have to let it run, then rebuild the shards / index again
[07:50:01] <exi> hm, thats bad. i hoped that i maybe could alter the config database to mark it as non draining again
[07:51:46] <exi> i'll try to remove the draining flag in the config database, maybe that is enough
[08:01:56] <circlicious> is there some mongo client that i can use for ease? like there is phpmyadmin for mysql. would be nice if the client also allowed to execute commands like you can execute sql commands/queries in PMA.
[08:03:17] <NodeX> phpmongoadmin or something like that it's called
[08:05:46] <circlicious> ok
[08:20:59] <Nicolas_> hi everybody
[08:21:10] <Nicolas_> i'm trying to use mongodb with php on my mac
[08:21:54] <Nicolas_> mongo is available in a Terminal window
[08:22:27] <Nicolas_> but phpinfo() doesn't display mongo extension
[08:22:48] <Nicolas_> i've installed mongodb with macports
[08:23:06] <Nicolas_> and then, mongo driver with pear
[08:23:21] <ron> Nicolas_: NodeX will solve all your PHP woes!
[08:27:53] <Nicolas_> thx ron
[08:30:11] <Nicolas_> NodeX seems to be absent
[08:30:23] <Nicolas_> does someone else could help me ?
[08:30:41] <Derick> did you add "extension=mongo.so" to php.ini?
[08:30:51] <Nicolas_> yes i've done it
[08:31:40] <Nicolas_> the file "mongo.so" is in the same directory as "intl. so" and "mysql.so"
[08:31:55] <NodeX> what's the
[08:31:57] <NodeX> oops
[08:32:03] <NodeX> did you restart your php ?
[08:32:23] <Nicolas_> i restarted apache many times
[08:33:05] <NodeX> does that also restart PHP?
[08:34:17] <Nicolas_> i'm not sure but i think so
[08:34:25] <Derick> and what's the output of "pecl install mongo" ?
[08:34:28] <Nicolas_> is there a way to restart php ?
[08:34:37] <NodeX> it's been a while since I used apache so I am not sure
[08:34:39] <Derick> it might just have installed it into the wrong directory compiled against the wrong php version
[08:38:47] <Nicolas_> the output of "pecl install mongo"
[08:38:49] <Nicolas_> Build process completed successfully
[08:38:50] <Nicolas_> Installing '/usr/lib/php/extensions/no-debug-non-zts-20090626/mongo.so'
[08:38:51] <Nicolas_> install ok: channel://pecl.php.net/mongo-1.2.6
[08:38:52] <Nicolas_> configuration option "php_ini" is not set to php.ini location
[08:38:53] <Nicolas_> You should add "extension=mongo.so" to php.ini
[08:43:46] <NodeX> did you add the required thigns to your php.ini?
[08:44:12] <Nicolas_> yes i did
[08:44:57] <Derick> Nicolas_: what does phpinfo() show for "extensions_dir" ? that needs to match '/usr/lib/php/extensions/no-debug-non-zts-20090626/'
[08:46:19] <Nicolas_> it matches with '/usr/lib/php/extensions/no-debug-non-zts-20090626/'
[08:46:19] <falu> With pymongo I'm "losing" connections. I have a for-loop with about 10-15 db-calls and after some iterations there are no more connections available. Why does this happen?
[08:55:13] <circlicious> so if i specify $set modifier option in .update() its going to replace the entire document or just change values?
[08:55:37] <circlicious> i read somewhere mongodb replaces entire documents, so one should not do too many updates or something
[08:59:58] <falu> circlicious: { $set : { field : value } } only changes "field", not the whole document
[09:05:42] <circlicious> ok. also how do you update "all" documents? like i just dont want to pass in any criteria
[09:06:00] <circlicious> or maybe some critera that holds true for all documents ?:/
[09:06:33] <NodeX> add multiple to it
[09:07:01] <NodeX> update(criteria, newData, upsert, multiple);
[09:07:17] <circlicious> ya but i wanna pass a criteria that holds true for all documents or simply omit it
[09:07:52] <circlicious> i mean, say if iwanted an equivalent of this in SL, "UPDATE table SET col = 'val';"
[09:07:58] <circlicious> SQL
[09:08:04] <NodeX> update({_id:{$exists:true}},{$set : {foo : 'bar'}},false,true);
[09:08:11] <circlicious> hm ok
[09:08:44] <NodeX> or some other indexed field to update on - doesn't have to be _id
[09:21:42] <diegok> NodeX: update({}, {...}, false, true) doesn't do it?
[09:22:58] <diegok> never tried that, but I've always thought first argument is just the same as find() first one
[09:32:27] <NodeX> diegok : I have never tried it either
[09:32:56] <diegok> NodeX: I use it on find({}, {field:1})
[09:33:03] <diegok> so, it should...
[09:33:47] <diegok> whats the best practice for pagination? (given that count() is an expensive op)
[09:35:54] <DigitalKiwi> I think it said use $range ?
[09:37:47] <DigitalKiwi> or hmm, it just says "range based queries" i don't think $range exists
[09:43:42] <NodeX> diegok : you don't have a choice unless you want inaccurate pagination
[09:43:54] <falu> diegok: there are a lot of pagination-related answers on stackeroverflow (http://goo.gl/nN7T1)
[09:44:15] <circlicious> count is expensivE?
[09:44:32] <diegok> NodeX: well, I will show continuous pagination. I only need to know if there are more.
[09:44:35] <NodeX> count is not really expensive, it's only expensive on non indexed fields
[09:44:49] <diegok> NodeX: it's expensive on indexed also
[09:45:17] <NodeX> where did you see that?
[09:45:31] <diegok> NodeX: I've experimented that and asked on the list
[09:45:51] <NodeX> I have never found that to be true sorry
[09:47:34] <diegok> https://groups.google.com/forum/#!msg/mongodb-user/Uw7uVQ7gXPs/PQCXX_knjawJ
[09:47:51] <NodeX> perhaps because my servers are very powerful I do not have the problem
[09:48:03] <diegok> NodeX: if you use SSD it helps
[09:48:14] <diegok> also helps if total results is not very large
[09:48:40] <diegok> it uses the index but then it scan...
[09:48:50] <NodeX> 5million rows
[09:48:59] <DigitalKiwi> i tested pagination with like 10 million items and it wasn't bad
[09:49:13] <diegok> 5 millon are results after using the index?
[09:49:22] <diegok> or total docs in collection?
[09:49:53] <diegok> s/rows/docs/ ;-)
[09:50:10] <DigitalKiwi> pagination slows down the further in you go because it has to walk the whole way from the beginning
[09:50:16] <diegok> DigitalKiwi: wasn't bad how many ms are?
[09:50:32] <DigitalKiwi> if you're that worried about it just don't let people go ten thousand pages in
[09:50:33] <NodeX> let me try on a 28 million doc collection
[09:51:14] <DigitalKiwi> there was this slideshow about pagination i saw that recommended you stop users anyway after they'd spent too much time >.>
[09:51:17] <diegok> NodeX: try a count({query}) where total results are big
[09:51:35] <DigitalKiwi> also said not to display how many total records there are
[09:51:42] <diegok> DigitalKiwi: the problem is not going deep, it's just with the count() op
[09:52:22] <DigitalKiwi> well, no, the problem is going deep, if you use indexes the count is not the worry :P
[09:53:09] <DigitalKiwi> if you don't use indexes well shame on you and you're not going to have good luck with anything
[09:53:40] <NodeX> on 28million docs the count is 3 seconds
[09:53:54] <NodeX> but it's a bit silly to count 28 million wihtout a filter
[09:54:16] <diegok> NodeX: ok, to and try with a filter
[09:54:35] <NodeX> err I did
[09:54:44] <DigitalKiwi> if you had a date field, and added a condition "newer than 1 week ago" then does it go faster?
[09:55:04] <diegok> DigitalKiwi: it goes faster if it has less to scan
[09:55:08] <NodeX> you asked for "lots of results" so I bought back all results
[09:55:21] <DigitalKiwi> so if it's indexed then it's good
[09:55:31] <diegok> NodeX: counting all docs is cached or something like that
[09:55:40] <NodeX> I didnt count all docs
[09:55:46] <diegok> NodeX: oh, ok
[09:55:47] <NodeX> well I did but I counted them with a filter
[09:55:49] <NodeX> db.geo_places.find({"_id": { $gt : ObjectId("000000000000000000000000")} }).explain();
[09:55:51] <NodeX> ;)
[09:56:06] <NodeX> that's NOT the same as find({})
[09:56:10] <DigitalKiwi> if it's cached then what's the problem ;_;
[09:56:11] <diegok> eheh
[09:56:28] <NodeX> DigitalKiwi I think he's sayiong the performance is slow on large result sets
[09:56:38] <diegok> well, you have forced a hard count()
[09:56:53] <NodeX> it never effects me because I dont do silly things on large result sets
[09:57:07] <diegok> but I see it taking lot more time that is should for smaller ones :(
[09:57:43] <DigitalKiwi> have you tried using explain and seeing if it's using btree or basic cursor?
[09:57:44] <NodeX> yep
[09:57:47] <diegok> NodeX: y mean taking les than 500ms, but still unacceptable here
[09:57:53] <diegok> sure
[09:58:13] <NodeX> count after isn't using Btree - I think that's the problem DigitalKiwi
[09:58:20] <NodeX> count after filter **
[09:58:27] <diegok> DigitalKiwi: ^ just that
[09:58:28] <DigitalKiwi> oh
[09:58:58] <diegok> DigitalKiwi: as I understand, count will scan all returned by index.
[10:01:33] <NodeX> it's a very tricky thing to optimise for
[10:02:34] <NodeX> personaly I would cache the query and it's count in memcache/redis and check that first
[10:03:10] <DigitalKiwi> oh this made me think about something
[10:03:50] <diegok> NodeX: yes, thats the way... but it's very uncomfortable on some situations
[10:04:09] <DigitalKiwi> so say you have a website, and people are browsing on a paginated list, they go to a new page, data gets added, then they go to a new page, how do you make it so that the data they see is not repeated (or skipped)
[10:04:10] <diegok> you can also cache total count on mongo :)
[10:04:12] <NodeX> I wouldnt let wide queries on the system
[10:04:45] <NodeX> DigitalKiwi I said cache the query not it's results
[10:04:58] <diegok> but it gets tricky when multi-key indexes are used.
[10:05:08] <NodeX> use a hash of the query paramters and the count() of that as the key/value
[10:05:14] <DigitalKiwi> NodeX: i meant this discussion not the cache part
[10:05:32] <NodeX> then I don't understand the question
[10:05:54] <NodeX> why would they see the data repeated?
[10:07:01] <diegok> in my case I should filter by 3 fields, each field has lot of values. Cached counts are a lot of them... but yes, that's the way :-/
[10:08:18] <NodeX> some people internaly shard on large data so the counts are always small
[10:08:30] <NodeX> then if page > 100 go get the count from archive
[10:10:34] <DigitalKiwi> skip(10).limit(10) ; add 10 to the database; skip(20).limit(10); shows the same results as the first query, right?
[10:11:26] <diegok> NodeX: ok, that should make it better as scanning is spreaded.
[10:11:48] <NodeX> DigitalKiwi : no because you added 10 records
[10:12:07] <NodeX> well yes and no - depends on your Sort I suppose
[10:12:23] <NodeX> but it will shift the last ten records up the chain 10 places
[10:12:57] <DigitalKiwi> right, and now you're looking 10 further (but since they were shifted it's the same 10 you just saw)
[10:13:08] <NodeX> that's an appside issue though
[10:13:17] <NodeX> and it's the same on every site in the world
[10:13:29] <DigitalKiwi> so how solve it? :D
[10:13:55] <NodeX> it's not really an error
[10:14:03] <NodeX> because it's not page 2 anymore it's page 3
[10:18:44] <DigitalKiwi> hrm, maybe, say you're sorting by date added, so _id works, so keep track of what _id the lowest _id they've seen, and then do $lt on the _id and limit to however many you want, update the _id they're on?
[10:20:44] <NodeX> surely that's alot of hassle when the user can just click back a page?
[10:21:26] <diegok> DigitalKiwi: how you solve that with other backends?
[10:21:45] <diegok> DigitalKiwi: thats not a db issu I think...
[10:23:10] <NodeX> If I was going to tackel the problem I would save the document id's in an array with the page number in session data and see if they had been there before and then show a message saying "these results may be stale"
[10:23:42] <DigitalKiwi> NodeX: my problem case also involves jquery.infinitescroll.js so there's no page to click back on really, and it would duplicate IDs in html, but maybe there are ways to avoid that...
[10:25:02] <DigitalKiwi> maybe I should just not use infinitescroll.js and use some api :(
[10:27:03] <NodeX> can you not add a callback to the scroller ?
[10:27:54] <NodeX> I do something similar on a site where articles (documents) are updated and I push the results into the browser with replaceWith();
[10:29:29] <DigitalKiwi> it's possible this even handles the case of duplicates and I'm all concerned over nothing :(
[10:29:54] <circlicious> oh man this is mad, i am not using type castig much and then fetching reusltsets in PHP is becoming mad
[10:30:03] <NodeX> I doubt it but you could adapt the code to handle dupes
[10:30:18] <NodeX> circlicious : I did warn you yesterday!
[10:31:42] <circlicious> yes, but now i understand what you said yesterday :D
[10:32:25] <circlicious> sweet dude :D app works great :D
[10:53:49] <txm> Hey - my first look at mongo DB - it comes free with meteor.com. I've a new collection. each document(?)/row has a name and I can see an _id. is there an auto-inc id available to me? (I understand this may mean I don't understand NOSQL ... but a UUID isn't convenient for users to speak)
[10:54:48] <ron> txm: no.
[10:59:30] <diegok> txm: why it isn't convenient?
[11:01:03] <txm> diegok because it is easier to say, look at number 42 than to say look at cc583cbc-74cf-40b9-8574-7b2eb37d4917
[11:01:33] <txm> thanks ron
[11:02:10] <ron> txm: if you want to use a sequence, you need to manage it yourself.
[11:03:16] <txm> thanks ron - will do
[11:03:58] <ron> txm: consider the need for an actual sequence though. think on how you want to query the data and not what 'feels' natural to you.
[11:08:01] <txm> sincerely appreciated ron; in practice it won't be used much or at all. the anchor can still be linking to the object_id - I just know users will feel more comfortable with a sequence_id column when speaking to each other even if it's of no technical merit.
[11:11:59] <ron> txm: well, I'd still use the ObjectId as the _id, you can use an additional id for external usage. we do something similar (though the external id is also objectid).
[11:13:11] <diegok> txm: but after a while users stop liking id's like 9887747774201 :-p
[11:13:31] <txm> ron: I won't touch _id, <a href's will still reference it so internally the app will reply on it - I just need a short tag for users
[11:13:34] <DigitalKiwi> use slugs?
[11:13:40] <diegok> txm: some kind of slug is my choice
[11:13:41] <diegok> :)
[11:14:10] <diegok> txm: username?
[11:14:28] <txm> diegok - when we reach client number 9887747774201 I'll call you to fix it :)
[11:14:36] <ron> txm: keep in mind that managing a sequence could be a pain once you start using shards.
[11:14:38] <diegok> txm: cool :p
[11:15:10] <diegok> txm: to manage a secuence you need some locking/atomic thingy
[11:16:12] <txm> diegok: I think findAndModify will do that?
[11:16:27] <txm> (atomic - not sharding)
[11:17:21] <ron> yeah, but keep in mind that it's not like a relational database where you have sequences you can use in an insert operation. it will be at least two separate operations.
[11:20:12] <diegok> well, inserts are rare so doing two ops it's ok probably... :-/
[11:20:47] <ron> well, yay then.
[11:21:06] <diegok> txm: ensure you don't shard this op!
[11:21:11] <ron> why identify clients with numbers at all though? :)
[11:21:26] <diegok> ron: that's what I think :-/
[11:21:33] <txm> ahh sod it, I won't bother. TypeError: Object [object Object] has no method 'findAndModify'
[11:21:44] <diegok> who wants to be a number !?
[11:21:54] <diegok> when can be an OID :-p
[11:22:06] <ron> identifying clients by numbers is so 1979 ;)
[11:22:18] <txm> look, we have 8 clients, I just wanted to put a number next to each one :)
[11:22:33] <diegok> txm: you can do it by hand then! :p
[11:22:38] <ron> 8 clients?! give them numbers manually ;)
[11:23:16] <txm> geeesh!
[11:23:20] <diegok> ehehehe
[11:24:06] <txm> if you have 200 clients and some with similar names ... oh never mind - I'm over it now - I'm bound to get tripped up on something else,
[11:25:41] <txm> the real point is I should be using a RDBMS for this data - but mongo is what meteor comes with. And I'm sometimes happy to learn something new :)
[11:28:02] <DigitalKiwi> https://github.com/meteor/meteor ?
[11:36:08] <txm> DigitalKiwi: that's the badger
[11:36:54] <txm> oh, oh, oh wait up - the valid reason for the sequence is .. client specification requires is! rock!!
[11:38:15] <DigitalKiwi> do they also require meteor?
[11:39:41] <txm> yup
[11:40:05] <DigitalKiwi> tell them they can't have both >.>
[11:41:50] <txm> Wouldn't they just point to the moon and say something along the lines of "yada yada we can get to the moon .. .. lorem ipsum .. .. but I can't have meteor and an auto inc ID next to each row?"
[11:41:58] <txm> I think they can have both, and the moon on a stick.
[11:42:50] <DigitalKiwi> tell them they aren't rows they're documents
[11:43:24] <txm> I think we're all being silly now, no?
[11:45:42] <NodeX> what's the problem?
[11:45:48] <NodeX> (in a nutshell)
[11:46:09] <txm> oh dear lord, please no.
[11:46:13] <DigitalKiwi> just tell them the truth, that meteor doesn't use a relational database, there is no concept of incremental IDs, and that implementing them is just not something that can be done safely
[11:46:32] <NodeX> incremental id's are easy in mongo
[11:46:39] <txm> but it can!
[11:46:48] <DigitalKiwi> oh?
[11:46:57] <DigitalKiwi> I thought we just had a discussion saying they weren't
[11:47:08] <NodeX> you have to maintain the collection yourself
[11:47:20] <NodeX> so it's 2 operations (as ron said I think)
[11:47:40] <NodeX> (I saw some Java mumbling about 2 operations)
[11:47:40] <txm> and it doesn't matter any more, I have bought a filing cabinet and an A$ notebook
[11:48:04] <txm> 8 box files are arriving tomorrow
[11:48:07] <txm> and a felt tip
[11:48:12] <txm> so I can write 1 to 8 on each
[11:48:20] <DigitalKiwi> >.>
[11:48:38] <txm> and if I use the same number twice I've got white labels which I will stick over
[11:48:52] <NodeX> haha
[11:50:16] <txm> so ... new question. My 8 clients request jobs. Usually I'd relate jobs to clients. I could then count jobs per client. Is the NoSQL method to count jobs per client or is it to keep a count of jobs in the client docuement?
[11:50:31] <txm> bear in mind I can still order post-its ...
[11:51:18] <DigitalKiwi> i dunno
[11:51:23] <DigitalKiwi> i'm feeling stupid now :(
[11:52:01] <NodeX> txm : it's however is the most efficient to query
[11:52:15] <NodeX> i/e do you query job counts more than clients?
[11:53:55] <txm> NodeX - in reality this is a tiny app so i guess I can do either. I'm going to display a table (DigitalKiwi that's an HTML table not some css3 fart with fading transitions and rounded corners) and display a client on each row, along with a count of jobs.
[11:54:18] <txm> I'll do it on the fly, and refactor when client ID 9 joins us :)
[11:57:05] <NodeX> then I really wouldnt worry about how you factor your schema
[11:57:24] <NodeX> whatever works for you - it's a small app so it wont make a bit of difference on performance
[11:57:33] <txm> thanks NodeX
[11:58:09] <NodeX> if you were scaling it for alot of users I would have a different answer
[12:30:11] <stonestone> I need to do a or query on a in operation using mongoose js, like : query.where('field1').in([0,1]).or('field2').in([0,1]);
[12:30:16] <stonestone> Any tips?
[12:58:06] <UnSleep> mmm it is a must to duplicate the database into another collection to manage info with map reduce?
[13:00:38] <UnSleep> i want to create a "infinite" number of id asociations-relationships and i dont see logic to create a new collection for each user with the full database...
[13:02:56] <UnSleep> its for a search engine that show different results for each user
[13:08:31] <NodeX> can't you embedd the result ?
[13:09:32] <UnSleep> embbed? .-? im very newbie in mongo
[13:09:41] <NodeX> nest
[13:12:33] <UnSleep> the idea is to put an array with all the ids in and out, but... the ids havent got all the data and duplicate data did not look very good idea (until now)
[13:13:27] <UnSleep> the problem is that the info can go into an infinite loop
[13:14:18] <UnSleep> i think i will need to find another schema
[13:15:13] <UnSleep> but i dont see another way to go with this...
[13:15:48] <UnSleep> its an object with lot of info what can being associted to other objects in the same collection (with all their info)
[13:17:05] <UnSleep> person -> like -> thing -> extradata
[13:17:25] <UnSleep> and those things are "objects" in the same collection
[13:18:22] <UnSleep> "person" can "like" "like" itself too
[13:18:37] <UnSleep> falling into infinite loop
[13:19:02] <ron> don't fall into an infinite loop. it's not good for you.
[13:20:17] <UnSleep> "person" can "like" "person" itself too... so i could need to "ban" all the "just liked data" to stop the loop
[13:21:10] <ron> if it helps, I didn't read anything besides the loop line so I have no idea what you're talking about.
[13:21:34] <NodeX> use job_applications
[13:21:47] <NodeX> goddamit, why did I mkae my terminal look like IRC
[13:26:36] <Bartzy> Hi
[13:26:55] <NodeX> Hi
[13:27:06] <Bartzy> How mongo knows to ask for a specfic page ?
[13:27:15] <Bartzy> I mean, mmap doesn't map to memory an entire file ?
[13:27:27] <Bartzy> It can do it on a page (4KB parts) basis ?
[13:27:56] <NodeX> why is that relevant to you running mongo?
[13:28:02] <Bartzy> just interesting to know
[13:28:12] <Bartzy> I have a few more questions, more relevant to adminitrating mongo
[13:28:20] <Bartzy> I can find out the total size of indexes.
[13:28:23] <UnSleep> its crazy to do a new query for each result?? for example "object a have 2000000000... objects associated in an array" can i chosee a part of that array (0-10, 10-20) and then do findone for each
[13:28:39] <Bartzy> However - if some indexes are rarely used (but needed when they are used) - they don't need to be in memory, right?
[13:29:21] <NodeX> "MongoDB uses memory mapped files for managing and interacting with all data. MongoDB memory maps data files to memory as it accesses documents. Data that isn’t accessed is not mapped to memory."
[13:29:39] <Bartzy> Also, if I have 6GB of RAM, and 5GB of indexes, that doesn't mean that my indexes will always be in RAM - because mongo mmap's data (actual documents) too, so the indexes will page out and in all the time ?
[13:29:57] <NodeX> http://docs.mongodb.org/manual/faq/storage/
[13:29:57] <Bartzy> NodeX: OK, thanks. That answers the rarely used index question
[13:31:12] <NodeX> Look at the working set statement at the bottom
[13:31:35] <NodeX> UnSleep : you probably want a graphing database for your query
[13:32:13] <UnSleep> yep but there is not any cheap solution for that :(
[13:32:19] <Bartzy> NodeX: Yeah, saw that. But for reasonable performance, if you can't keep most of your working set in RAM - you need to at least keep your indexes in RAM - right ?
[13:32:45] <NodeX> neo4j ?
[13:32:58] <NodeX> Bartzy : that's where sharding comes in
[13:33:10] <Bartzy> NodeX: So you think - my RAM is 6GB, my indexes are 3GB - great! I have room to spare.. but that is not correct since if you have a big working set, your indexes will get swapped out from memory because of that data, even though they are more important in RAM than that data.
[13:33:11] <UnSleep> i will take a look at this http://www.mongodb.org/display/DOCS/Trees+in+MongoDB
[13:33:55] <NodeX> I would imagine the indexes have a higher place in memory plus they work on an PRU
[13:33:58] <NodeX> LRU *
[13:34:03] <Bartzy> LRU?
[13:34:09] <Bartzy> Why would they have a higher place in memory ?
[13:34:10] <NodeX> so the OS or whatever determines the usage
[13:34:21] <Bartzy> The OS takes care of that, mongo doesn't know
[13:34:37] <Bartzy> Ah - that's interesting, so because the indexes are always used - they will almost never be swapped out , because it's LRU ?
[13:34:50] <NodeX> that's what the docs suggest yes
[13:34:59] <Bartzy> the storage docs ? I didn't see that
[13:35:00] <Bartzy> thank you.
[13:35:40] <NodeX> http://www.mongodb.org/display/DOCS/Caching
[13:35:46] <NodeX> the top part explains it best
[13:40:32] <Bartzy> yeah, cool, thanks
[13:40:33] <Bartzy> cool idea
[13:40:48] <Bartzy> much better than mysql's dreaded buffer pool, if the performance is still good
[13:41:58] <NodeX> performance is awesome
[13:56:38] <houms> good day all we are trying to setup 3 servers with mongodb and use them in test env. we would like to use repl. sets and sharding. our plan was to run mongod mongos and config on all three. is this feasible?
[13:58:13] <tncardoso> houms: yes it is
[13:58:33] <tncardoso> houms: just put different servers on different ports (the default ports work ok)
[13:58:51] <Bartzy> Should I disable write caching for SSDs when using MongoDB ?
[13:58:53] <Bartzy> I'm using a hardware raid
[13:59:11] <tncardoso> houms: you should check this link http://www.mongodb.org/display/DOCS/Simple+Initial+Sharding+Architecture
[14:03:20] <houms> thanks tncardoso. reading it now. and I assume the config params. can all be specified within the mongod.conf correct?
[14:03:53] <tncardoso> houms: yes, You can set every parameter of the command line in the config file. The -f flag specifies wich config file to use.
[14:04:33] <mediocretes> so, this is a thing about which people might have opinions: http://nosql.mypopescu.com/post/27131117723/from-mongodb-to-cassandra-why-atlas-platform-is
[14:04:55] <houms> tncardoso is it true that if you plan on sharding then you will need 3x the amount of servers per shard since each will have to have its own repl. set?
[14:05:31] <houms> in the link you posted it shows 3 shards and 9 hosts
[14:06:00] <tncardoso> houms: its a good thing to have 3 machines in the replica set. You will thank this when in maintenance
[14:06:26] <houms> but if we plan on using only 3 servers in production then is it best not to use sharding?
[14:06:45] <tncardoso> houms: usually you should first scale vertically
[14:07:06] <tncardoso> houms: only consider sharding if one very good machine is not capable of handling your load
[14:07:32] <houms> so really using 3 good machines with repl set may be enough depending on our load?
[14:07:45] <tncardoso> houms: yes
[14:08:15] <houms> thanks tncardoso btw for answering my newb questions. this all very new to me.
[14:08:28] <tncardoso> houms: the replica set can be used to improve your read troughput using slaveOk
[14:08:41] <houms> last one :P so if we need to shard at that point we should add more servers first
[14:09:11] <tncardoso> houms: I recommend you to benchmark your application
[14:09:35] <tncardoso> houms: there is no consensus in the community, because this is heavily dependent on your application
[14:09:49] <houms> slave0k is where they will send read request to other members instead of primary be default correct?
[14:09:57] <tncardoso> houms: but if you need to shard, its better not to wait until the machine is dying
[14:10:21] <tncardoso> houms: slaveOk will allow the secondary machines to be queried
[14:10:38] <houms> I guess what I was trying to determine from my question is if you can do 3 repl sets and 3 shards using only 3 servers
[14:11:04] <houms> slave0k is set on the primary only or all \servers
[14:11:07] <tncardoso> houms: Yes you can, but I don't know it this is a good thing
[14:11:30] <houms> well that is what i was trying to determine. I certainly do not want to do what is not suggested by the community
[14:11:34] <tncardoso> houms: Can't remember
[14:11:40] <houms> fair enough
[14:11:44] <tncardoso> houms: you should start simple
[14:11:50] <tncardoso> houms: :)
[14:11:59] <houms> is 3 servers not considered simple?
[14:12:13] <tncardoso> houms: 1 replica-set is simple :)
[14:12:21] <tncardoso> houms: 3 servers are ok
[14:13:13] <spillere> i have a query db.pics.find().limit(5), how can I sort the last items added ?
[14:13:42] <tncardoso> houms: using one master and one slave in the same machine is not optimal because they will compete for the RAM
[14:13:42] <spillere> im trying db.pics.find().limit(5).sort({_id:-1}), but i dont think thats right
[14:13:48] <NodeX> sort({$natural : -1});
[14:14:01] <spillere> great, ty!
[14:14:02] <NodeX> unless you have a timestamp/date field
[14:14:08] <spillere> i have a created
[14:14:23] <NodeX> created : -1
[14:14:26] <spillere> "created" : ISODate("2012-07-17T15:44:41.490Z")
[14:14:28] <spillere> ok
[14:15:32] <spillere> db.pics.find().limit(5).sort({created:-1}) or db.pics.find().limit(5).sort({'created':-1}) gives some error
[14:15:52] <spillere> but on mongo works, and python dont, lets check error
[14:16:48] <spillere> NameError: global name 'created' is not defined
[14:17:03] <NodeX> then it's a python issue
[14:17:22] <spillere> yep
[14:20:59] <houms> is there a way to intiate a repl set from conf file as opposed to logging into the db to initiate?
[14:40:10] <_simmons_> Hi everybody.. I'm trying to use pymongo to do a nagios monitoring script.. but I can't/or dont know how to send commands to mongo after the connection is created..
[14:40:49] <_simmons_> There is no method to do a "dbisMaster()" for example
[14:40:56] <algernon> have you consulted the tutorial? http://api.mongodb.org/python/current/tutorial.html
[14:41:12] <algernon> ah, those kind of commands.
[14:42:03] <algernon> http://api.mongodb.org/python/current/api/pymongo/database.html#pymongo.database.Database.command
[14:44:32] <_simmons_> Someone humm.. let me see
[14:44:40] <_simmons_> tks
[14:44:42] <_simmons_> :)
[15:14:43] <bencc> anyone knows which wacom tablet is used in the first video in the mongodb webinar?
[15:14:46] <bencc> http://www.10gen.com/presentations/webinar/online-conference-deep-dive-mongodb?mkt_tok=3RkMMJWWfF9wsRoiv63OZKXonjHpfsX86e0rULHr08Yy0EZ5VunJEUWy24QBT9QhcOuuEwcWGog8kVxfH%2B4%3D
[15:17:51] <NodeX> random!
[15:37:48] <mw44118> Is there a way to do a bulk delete in mongo? I have a list of ObjectIDs and I want to delete them all. Right now, I'm looping through each and deleting them one-by-one.
[15:38:25] <NodeX> _id : { $in : .... ?
[15:48:35] <spillere> how can I get the item created after some date? i have a object called created with the date
[16:04:09] <TkTech> spillere: $gt
[16:23:23] <Aram> hi all. is there a way to start a single mongod with --replSet and force it to be a primary? this is only for testing/debuggin. right now I'm using the usual rs.initiate(), but it takes 30 second to completion. Our tests run several mongod instances and take 200 seconds to complete, while without --replSet they take only 2 seconds.
[16:34:07] <Aram> or is there some other way to speed up the process?
[16:34:35] <Bartzy> Hi
[16:34:45] <Bartzy> Why you can't easily kill an index creation job ?
[16:44:15] <BurtyB> I'm looking at sharding an existing collection - I see it's "limited" to 256GB the easy way - I assume that doesn't include indexes?
[16:53:38] <_simmons_> algernon: db.command('serverStatus')
[16:53:44] <_simmons_> many thanks man!
[16:55:06] <Bartzy> Why you can't easily kill an index creation job ?
[16:55:32] <Bartzy> also, when using mongodump to dump the system.indexes collection - that does not backup the indexes ? mongodump can't backup indexes ?
[16:56:01] <NodeX> the indexes are backed up when you dump
[17:01:08] <Bartzy> NodeX : But not when you backup a single collection?
[17:01:20] <Bartzy> How are they backed up , if mongorestore just inserts the data when restoring ?
[17:01:28] <Bartzy> So indexes are created on the fly , or by restoring them from backup ?
[17:04:32] <BurtyB> Bartzy, they're created after all of the data has been restored iirc
[17:04:48] <Bartzy> so on the fly
[17:04:50] <NodeX> ^^
[17:04:51] <Bartzy> that can take hours and days
[17:04:56] <Bartzy> right ?
[17:04:58] <NodeX> data goes in, then index is run
[17:04:59] <Bartzy> on very big data sets
[17:05:05] <NodeX> yes
[17:05:10] <Bartzy> so to actually back up the indexes - I should back up the files
[17:05:35] <NodeX> yes, it backs up each index when it dumps the file
[17:05:46] <Bartzy> dumps the file = mongodump
[17:05:51] <Bartzy> And we just said it doesn't backup indexes
[17:10:24] <Bartzy> NodeX: ?
[17:10:55] <hdm> Any thoughts on how to recover from this? Tue Jul 17 12:10:21 uncaught exception: count failed: { "errmsg" : "10320 BSONElement: bad type 71", "ok" : 0 }
[17:14:04] <hdm> argh, points to corruption, no fun
[17:17:01] <txm> if each document has a flag, deleted. Is there any efficiency in using 1/0 over Yes/No or Y/N?
[17:27:18] <NodeX> dump = mongodump
[17:27:31] <NodeX> backs up = yes it does backup indexes ... AFTER it has dumped the file
[17:28:44] <Bartzy> NodeX: So indexes are not created on the fly when restoring?
[17:29:03] <chubz> How come I can't use any other port than 27017 with mongo? I started a mongod process with the port 27018 but I can't "mongo localhost:27018". i even tried turning off iptables, any ideas?
[17:39:00] <hdm> chubz: s/localhost/127.0.0.1/
[17:39:10] <hdm> some OSs default localhost to ::1
[17:41:13] <chubz> hdm: s/localhost/127.0.0.1 ? what is that ? is that a command?
[17:41:31] <hdm> use 127.0.0.1 instead of localhost
[17:41:44] <hdm> s// is sed/vim/regex syntax for those inclined :)
[17:42:12] <chubz> [initandlisten] couldn't unlink socket file /tmp/mongodb-27017.sockerrno:1 Operation not permitted skipping
[17:42:19] <Bartzy> NodeX: ?
[17:42:22] <Bartzy> ;)
[17:46:29] <chubz> hdm: [initandlisten] couldn't unlink socket file /tmp/mongodb-27017.sockerrno:1 Operation not permitted skipping . any idea? i tried deleting the sock file
[17:46:57] <hdm> bad permissions in /tmp? not sure
[17:47:07] <hdm> should be able to ignore that
[17:48:34] <NodeX> Bartzy : I have already answered
[17:50:31] <NodeX> incase you missed the answw
[17:50:33] <NodeX> answer *
[17:50:34] <NodeX> [18:05:16] <NodeX> data goes in, then index is run
[17:51:48] <Bartzy> NodeX: I'm sorry, but you got 2 answers that are not the same
[17:52:11] <Bartzy> If while in mongorestore data goes in mongodb, and the index is run (meaning ensureIndex is running?), then mongodump IS NOT backing up the files.
[17:52:15] <Bartzy> the files = indexes, sorry.
[17:52:31] <Bartzy> Unless I misunderstood your question.
[17:53:15] <NodeX> no my answers are the same
[17:53:25] <NodeX> mongo backs up the data and index with mongo dump
[17:53:35] <NodeX> then it restores the DATA then INDEX with mongo restore
[17:54:58] <progolferyo> does anyone have any ideas about this one. I have a replica set primary that is getting super overloaded, 'ar' and 'aw' in mongostat are through the roof. this replica set is one of the shards in my cluster. there are only writes going on and disk is just getting hammered, but the weird thing is on the read side. if i do iostat, reads are super high
[17:55:22] <progolferyo> so it feels like there is something that is causing reads to go through the roof o this primary, even though no queries are hitting the box
[17:55:23] <progolferyo> any ideas?
[17:56:54] <Bartzy> NodeX: Got it. So restoring won't take a long time because of index creation, because indexes are backed up too, if I understand correctly ?
[17:57:08] <Bartzy> NodeX: Also, when backing up a single collection - indexes for this collection only will be backed up by mongodump ?
[18:02:19] <TheEmpath> I have discovered that it is easier to justify the usages of dbrefs than it is to learn how to use doctrine to autopopulate manual references
[18:02:27] <TheEmpath> do not hurt me :(
[18:16:12] <NodeX> Bartzy : yes
[18:18:17] <NodeX> Bartzy : the indexes still have to be mapped back into memory
[18:20:39] <Bartzy> yeah
[18:20:48] <Bartzy> but that's in case of restart too right ?
[18:20:51] <Bartzy> server restart
[18:21:39] <NodeX> yer
[18:22:21] <rnickb> if i check out the mongo source, how do i build just the c++ driver?
[18:40:30] <Bartzy> NodeX: Thanks.
[18:40:48] <NodeX> ;)
[18:42:21] <Bartzy> ;)
[18:42:59] <rnickb> are the c++ drivers for mongo included under the mongoclient target?
[18:55:43] <NodeX> rnickb : You should try the mailing list if nobody answers
[19:45:23] <unomi> Hi
[19:45:26] <unomi> Anyone around?
[19:46:14] <unomi> getting deeply frustrated by serverside scripting
[19:47:02] <unomi> db.users.find().forEach(function(userObj){return user_counters_update(userObj);});)
[19:47:23] <unomi> what kind of magic must I invoke to get this functionality?
[19:54:47] <dstorrs> hey all. Got some weird behavior here, any ideas?: I am connected to the right machine, on the right port, talking to mongos as expected. I do a 'save' with 'safe' set. I get an ID back. No object hits the DB.
[19:54:52] <dstorrs> I CAN write from the shell.
[19:55:10] <dstorrs> I have verified that I wrote to & looked in the correct collection each time.
[19:55:21] <dstorrs> there's nothing in the log at all from the last 7 hours.
[19:56:27] <dstorrs> any thoughts? this is a mission-critical issue right now, and I'm a bit stressy over it.
[19:57:05] <dstorrs> btw, when I said "I am connected to...", I meant "my app code is connected to..."
[19:57:54] <hdm> dstorrs: check the other shards? maybe its getting stored in the wrong db
[19:58:01] <hdm> like the config db for some reason
[19:58:59] <dstorrs> hdm: I'll check. But I dumped my database handle and it says it is connected to the "cm_prod" DB (correct) on the 27017 port on the correct IP.
[19:59:38] <kchodorow> dstorrs: you're using perl, right?
[19:59:46] <dstorrs> yep
[20:00:36] <hdm> dstorrs: not sure what else could cause it, id definitely look at the shard configuration a bit closer though
[20:00:43] <kchodorow> can you run an insert with safe=>false, then the next line run print Dumper($db->run_command({getLastError=>1}));?
[20:01:23] <kchodorow> dstorrs: and you say the db is correct, is the collection correct?
[20:01:33] <dstorrs> yep
[20:02:08] <kchodorow> because iirc, perl lets you do stuff like $db->insert(...) and it doesn't work, but it doesn't complain, etiher
[20:02:28] <kchodorow> but i guess that wouldn't be returning the _id
[20:02:43] <dstorrs> that was why I had safe turned on -- if the insert fails, it should croak.
[20:02:57] <dstorrs> ok, I did the non-safe and dumped last error. it says err => false.
[20:03:00] <dstorrs> checking for data...
[20:03:12] <dstorrs> nope
[20:03:33] <kchodorow> okay, can you pastebin the code?
[20:03:44] <dstorrs> sure
[20:03:56] <dstorrs> one sec...
[20:04:44] <dstorrs> do you want all of it or just the save command?
[20:04:57] <kchodorow> connection through the save
[20:04:59] <kchodorow> and can you dump $db->run_command({isMaster=>1}), too?
[20:05:07] <dstorrs> okyep
[20:06:19] <dstorrs> kchodorow: isMaster says yes, with msg => 'isdbgrid'
[20:06:28] <dstorrs> don't know what the latter means. paste coming...
[20:06:37] <kchodorow> that's fine, it just means you're connected to a mongos
[20:08:23] <kchodorow> (also, does it work from within perl? e.g., if you do a $coll->findOne({_id=>$id}) after the insert, does it return anything?)
[20:09:40] <dstorrs> http://pastie.org/4273667
[20:09:51] <lahwran> how often does $add screw up?
[20:11:03] <lahwran> I'm getting an incorrect value in something that I'm using $add on very frequently
[20:11:34] <dstorrs> kchodorow: no, Perl also reports the collection as empty
[20:12:19] <dstorrs> lahwran: are you writing to it from multiple threads / procs ?
[20:13:52] <kchodorow> dstorrs: were there other fields in the getlasterror output?
[20:14:08] <dstorrs> right, sorry. should have included that. one sec.
[20:14:44] <kchodorow> np
[20:14:48] <lahwran> no threads, the process runs once every minute
[20:15:05] <lahwran> but the process is serially sending a huge amount of $add-s
[20:15:50] <dstorrs> kchodorow: http://pastie.org/4273694
[20:17:16] <kchodorow> okay, in the shell can you do use config; db.databases.find() and look for cm_prod?
[20:17:35] <kchodorow> db.databases.find({_id:"cm_prod"})
[20:18:02] <dstorrs> { "_id" : "cm_prod", "partitioned" : true, "primary" : "RS1" }
[20:18:26] <dstorrs> hm...
[20:18:59] <dstorrs> Ok, I don't know if this is remotely relevant, but we are currently running a dangerous configuration -- our replica sets are one primary box, two arbiters
[20:19:14] <dstorrs> i.e., no real secondary.
[20:19:32] <kchodorow> hmm, i think mongos is going to be stupid about that and not be able to do migrates
[20:19:37] <dstorrs> I know this is horrific, but it's due to budget and there really isn't a viable solution
[20:19:47] <kchodorow> because it'll try to have 2 out of 3 servers have a copy of the data before confirming the migrate
[20:19:59] <kchodorow> it'd be better just to have 1 machine
[20:20:11] <dstorrs> when you say "migration", you're talking about the balancing bewteen shards?
[20:20:15] <kchodorow> yeah
[20:20:26] <dstorrs> it did do the balancing, but it took a LONG time.
[20:20:32] <dstorrs> like, 3 days.
[20:20:35] <kchodorow> could one of the servers be full up on disk space?
[20:20:40] <dstorrs> no.
[20:20:42] <kchodorow> k
[20:20:53] <dstorrs> each one has an 800 G disk, and something like 100 or 200G of data local
[20:20:58] <dstorrs> (after balancing)
[20:21:57] <dstorrs> ok, we'll switch off the RSs
[20:21:58] <kchodorow> can you look at db.chunks.find({ns:"cm_prod.jobs_preprocess_Video"})?
[20:22:08] <dstorrs> what's the easiest way to undo that quickly and safely?
[20:22:39] <dstorrs> kchodorow: no response comes back from that query.
[20:22:54] <kchodorow> try it without the filter, i might have the field wrong
[20:23:37] <kchodorow> probably best way to get to a 1-member set would be to reconfigure the set so the 2 arbiters have 0 votes
[20:23:45] <kchodorow> then shut down both arbiters
[20:23:53] <kchodorow> then reconfigure the set to only have 1 member
[20:25:10] <dstorrs> lahwran: are you doing safe updates? it could be that one of them is failing.
[20:25:27] <dstorrs> lahwran: is your number incorrect due to being low, or high?
[20:25:47] <dstorrs> kchodorow: ok, I've got my team taking the RS's down while I stay on this.
[20:25:52] <lahwran> high
[20:26:03] <lahwran> I've yet to observe it being incorrect by being low
[20:31:00] <dstorrs> lahwran: huh. nothing really springs to mind, sorry. :<
[20:31:10] <lahwran> yeah... I'm stumped
[20:31:11] <dstorrs> are you SURE it's not app code?
[20:31:17] <lahwran> I have absolutely no idea what it is.
[20:31:19] <dstorrs> kchodorow: any thoughts?
[20:31:20] <lahwran> it's so incredibly hard to debug
[20:31:32] <kchodorow> dstorrs: try it without the filter, i might have the field wrong
[20:31:52] <dstorrs> doh. thought I had responded on that,s orry.
[20:32:17] <dstorrs> yeah, I tried it when you said that. there are plenty of chunks, but I'm not seeing anything about preprocess.
[20:32:26] <dstorrs> hmm...let me try a different check.
[20:33:47] <dstorrs> nope.
[20:33:59] <dstorrs> mongos> db.chunks.find({_id : { $regex : /cm_prod\.jobs_preprocess_Video/ }})
[20:34:02] <dstorrs> no response
[20:35:24] <kchodorow> is there an entry for that collection in db.collections
[20:35:26] <kchodorow> ?
[20:36:02] <kchodorow> does inserting into this coll from the shell work?
[20:36:11] <dstorrs> yes
[20:36:23] <kchodorow> (remember to switch out of the config db before trying inserting)
[20:36:39] <kchodorow> darn, got to go
[20:36:50] <kchodorow> maybe post on user list?
[20:36:57] <dstorrs> there is not a colelctions entry
[20:37:00] <dstorrs> should there be?
[20:37:07] <kchodorow> yes
[20:37:14] <kchodorow> seems like something about the config got messed up
[20:37:36] <dstorrs> actually, 'show collections' throws an error.
[20:37:41] <dstorrs> huh.
[20:37:53] <dstorrs> ok, where would I RTFM for how to fix this?
[20:38:05] <dstorrs> "$err" : "dbclient error communicating with server: dbs1d1:27018",
[20:38:42] <dstorrs> ah. actually, that might be the issue -- the hostname changed. I don't know why it's using dbs1d1, since it was never sharded with that name.
[20:40:05] <mrfloyd> hi everyone
[20:40:22] <mrfloyd> i need an advise for my case
[20:41:48] <mrfloyd> i have a collection where i store stories, each story have photos from different users, and each photo has comments from different users
[20:48:05] <dstorrs> mrfloyd: what's your question?
[20:49:04] <mrfloyd> i am storing the username inside each subobject photos, comments etc.. so i use it whenever i need to displaying without refering to the users collection
[20:49:40] <mrfloyd> i need to know how should i design my stories collection to be able to update this nested field easily
[20:51:29] <dstorrs> first of all, why would you want to? if user X made comment #778383, why would you want to change it to say user Y ? are users really allowed to change their nicks in your app? that's going to be more trouble than it's worth.
[20:51:45] <mrfloyd> yes
[20:51:51] <mrfloyd> they can change username/nickname
[20:52:18] <dstorrs> well, not to be too harsh, but here's your first example of why that's a bad idea.
[20:52:20] <mrfloyd> for sure users updates their less often then other users reading stuff
[20:52:48] <mrfloyd> what do you propose?
[20:52:49] <dstorrs> I would strongly recommend that you reconsider that requirement. if it's not your decision, try to lobby the requirements owner.
[20:52:58] <dstorrs> just make it "no, you cannot change username"
[20:53:05] <dstorrs> that's true of almost all sites.
[20:53:13] <mrfloyd> try instagram
[20:53:20] <mrfloyd> ever played with it?
[20:53:25] <dstorrs> otherwise, there is no easy way -- you just need to walk the structure recursively.
[20:53:29] <dstorrs> nope, I haven't.
[20:53:35] <mrfloyd> i have a solution
[20:53:43] <dstorrs> ok, glad to here.
[20:53:45] <dstorrs> *hear.
[20:53:48] <mrfloyd> storing the user id only
[20:53:56] <dstorrs> oops, gotta run.
[20:54:00] <dstorrs> I hope it works out.
[20:54:02] <mrfloyd> and visit the user collection table one time
[21:12:53] <mh512> n/w 3
[21:13:11] <lahwran> if I delete everything with a "modification_date" of less than now, then will documents without that field be deleted too?
[22:03:34] <dstorrs> I have a a 2-shard system, 3 configs. Each shard is a 1-member repl set (I know; bad). The hostname of both DB machines changed. If I use the "change hostname within a repl server" procedure from the docs, will that propagate to the config servers?