PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 22nd of July, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[07:34:21] <[AD]Turbo> hi there
[10:09:51] <remonvv> \o
[10:54:08] <pl2> Is there a quick one line command available to allow me to import an entire /dump folder?
[10:55:15] <Nodex> mongoimport
[10:55:24] <Nodex> just move one dir up :)
[11:00:21] <pl2> Hi Nodex, that's what i'm using, though it's asking for one collection at a time..
[11:01:14] <kali> mongorestore with no argument will look for a "dump" folder in the current path and load everything
[11:08:39] <Nodex> ^^
[11:28:15] <pl2> hi kali, yep mongorestore did the trick :)
[11:33:29] <Nodex> my bad, I meant mongorestore. Appologies
[11:42:32] <pl2> No worries. They're quite similar ;)
[11:54:04] <singh_abhinav> I am planning to create auto increment field by using counters collection ... what can be the potential disadvantage of this approach when we will go for sharding
[11:55:43] <kali> i guess you will not shard the counters collection, so... none. i would expect the overhead to be constant
[11:55:58] <kali> let me just say i would not go this way
[11:56:03] <kali> sharded or not
[12:00:29] <singh_abhinav> kali: in some of the cases mongodb ids seems very big ..like userid or orderid ...in that case what should we do? mongodb ids seems too big :)
[12:03:02] <kali> they are 12 bytes... unless you've adopted very short field names, chances are this is negligible
[12:05:41] <rspijker> I'm having some 'issues' on a db setup which I don't quite understand. I'd like to run it by the channel to see if my understanding of things is correct and see if somebody might know what is going on.
[12:06:22] <rspijker> The issue is regarding storage space. In the system I have running there are frequent removals of large amounts of data from collections followed by large insertions and again large removals, etc.
[12:07:25] <rspijker> My understanding of mongodb storage is that it keeps a list of deleted records, in size buckets (256-512, 512-1024, …) and when a new insertion takes place, it will check this list and grab something suitable from a bucket, or grab something from the next bucket up.
[12:08:55] <rspijker> That does not seem to be happening for me… The storage on the system just keeps on growing (150GB for a <2GB data set). So I'm just wondering what I'm missing exactly.
[12:34:50] <CIDIC> anyone around
[12:34:51] <CIDIC> ?
[12:35:47] <Nodex> never
[12:37:56] <puppeh> hey, what would you recommend me if I want to add the sum of all fieds of multiple documents, mapreduce or aggregation framework?
[12:38:07] <CIDIC> Nodex: do you need to do anything special when inserting a related object id?
[12:38:33] <Nodex> CIDIC : in what way?
[12:39:14] <CIDIC> if I want to have something like {relatedThings: [id1, id2, id3]
[12:40:07] <Nodex> I don't know what "anything special" means
[12:40:34] <Nodex> you do realise that mongodb doesn't do anything with these things internaly for example joining at query time don't you?
[12:41:02] <kali> puppeh: if it fits in the AF, go AF.
[12:41:17] <CIDIC> Nodex: I didn't think it did but I was not sure
[12:41:40] <CIDIC> because the _id is an object not an int I wasn't sure if I needed to make it an object to match?
[12:42:34] <CIDIC> although it says ObjectId("xxx") in quotes so maybe it is a string? I am just asking what I should do to match it? int? string? obj?
[12:43:15] <Nodex> it's up to you, store it how you like
[12:43:33] <CIDIC> Nodex: what is the best practice for matching it to the obj id?
[12:43:34] <Nodex> if you store it as a string, it will be need to be cast as an ObjectId
[12:43:52] <CIDIC> so I should store it as an obj id?
[12:44:00] <Nodex> if you -must- relate these things then I suggest you store it as an ObjectId
[12:44:22] <CIDIC> that is all I was asking
[12:45:12] <CIDIC> thanks
[12:45:18] <Nodex> you should really avoid relating things if you can
[12:45:31] <CIDIC> Nodex: I am aware I am just trying to learn how to do the basics
[12:46:58] <CIDIC> Nodex: if I have something like Categories: name, description, content, and categories have articles. and I am making something where I want to goto /category/foo/ and it fetches the category name, description, content ect, and all articles in that category how would you recommend designing the schema?
[12:47:27] <CIDIC> in that case a "join" would make sense right?
[12:47:59] <CIDIC> bc I want to be able to aggregate articles based on things like date or author not just by category
[12:48:00] <Nodex> do the names of the categories ever change?
[12:48:11] <Nodex> and or the descriptions?
[12:48:28] <Nodex> ever/rarely
[12:48:32] <CIDIC> Nodex: they could the name/description is essentially page content in this scenario
[12:48:39] <CIDIC> probably rarely
[12:49:11] <CIDIC> same with the author and the publish date
[12:49:20] <Nodex> then I would embedd them and forget the join
[12:49:38] <CIDIC> how do you aggregate by author then?
[12:50:34] <CIDIC> I am basically asking what do you do when you have multiple aggregates of generally equal importance?
[12:51:04] <Nodex> I don't have a clue what your schema looks like, a typical document or what you're trying to achieve so I cannot comment on "aggregating by author"
[12:51:23] <Nodex> what I can advise is this. If something rarely or never changes then embedd it
[12:52:17] <CIDIC> Nodex: I am familiar with sql, trying to understand how you would accomplish equivalent tasks in mongodb.
[12:53:14] <CIDIC> if I had articles: id, name, content, publish_date, author_id, category_id; authors: id, name; categories: id, name, content;
[12:53:22] <CIDIC> how would you structure that in mongodb?
[12:53:57] <Nodex> I would embed the author and the category
[12:55:00] <CIDIC> Nodex: so the author and category data would be copied for each articles. that is fine. what if the author and the category data are somewhat large? what if a category has like 10 fields?
[12:55:50] <Nodex> as long as it's < 16mb it doesn't matter
[12:56:21] <CIDIC> Nodex: aren't there downsides to having that much redundancy in the stored data?
[12:56:49] <Nodex> why would there be?
[12:58:27] <remonvv> CIDIC, the downsides are that your application has to enforce consistency, (so update dduplicated data if the original data changes) and average document size. You should not embed anything that's unbounded in size.
[12:59:23] <remonvv> The former only applies if (parts of) the embedded data is copied from other documents rather than being the only place where that data exists.
[12:59:49] <rspijker> nobody has any ideas regarding my little storage issue?
[13:02:17] <remonvv> rspijker, missed it
[13:02:39] <rspijker> let me repeat it then
[13:02:44] <rspijker> The issue is regarding storage space. In the system I have running there are frequent removals of large amounts of data from collections followed by large insertions and again large removals, etc.
[13:02:47] <rspijker> My understanding of mongodb storage is that it keeps a list of deleted records, in size buckets (256-512, 512-1024, …) and when a new insertion takes place, it will check this list and grab something suitable from a bucket, or grab something from the next bucket up.
[13:02:54] <rspijker> That does not seem to be happening for me… The storage on the system just keeps on growing (150GB for a <2GB data set). So I'm just wondering what I'm missing exactly.
[13:02:54] <kali> rspijker: have you tried to compact and/or repair to validate you're actualy suffering from fragmentation ?
[13:03:23] <rspijker> kali: I'm having an engineer add some storage to the LV so that I can repair
[13:03:30] <remonvv> rspijker, ah, familiar problem. It's documented as you describe IIRC but in my experience storage size only guess down or is reused after compacting.
[13:03:36] <remonvv> afk for a sec
[13:04:17] <rspijker> kali: I checked db.collection.storageSize() - dataSize though and the difference was 127GB
[13:25:46] <remonvv> rspijker, I'm assuming you're on 2.4.x?
[13:25:54] <rspijker> I am
[13:28:18] <remonvv> rspijker, okay. For me it does reuse disk space after removes but it's somehwat erratic. For example, if you generate 10k documents {_id:.., a:1}, call stats, remove them, add them, and call stats again it will have reused the disk space.
[13:28:44] <remonvv> rspijker, however, in more "production-ish" environments we do so ever growing disk usage even though the dataset size remains roughly equal.
[13:46:53] <benza89> Hi all , Can someone explain me what is the meaninig of Roolback of a menber of a replicaset ?
[13:48:22] <kali> "rollback": when a switch over happens, your replica set may have two nodes believing they are master for a few seconds
[13:48:47] <kali> so the write ops accepted by the one that will not stay master have to be reverted
[13:51:42] <benza89> How can I configure this node to be secondary ?
[13:53:59] <benza89> @kali, How can I configure this node to be secondary ?
[13:54:09] <kali> benza89: i don't understand the question.
[13:56:58] <remonvv> I concur
[13:58:48] <benza89> kali, I have in my replicaset two nodes and they are both beliving that they are master ,I want to reconfogure my node to act like secondary node
[13:59:07] <benza89> I am sorry i f I am not clear I am new to mongodb
[14:02:02] <remonvv> benza89, that's only possible if you made a mistake in your repset setup.
[14:02:14] <remonvv> benza89, a repset consists of at least 3 members
[14:05:20] <benza89> @remonvv , But I already set a repilcaset of only one node to perform my tests of sharding , so if I use a replica set of 2 menbers it can not work ?
[14:08:45] <remonvv> repsets do not have value until they have 3+ (and uneven amount of) members. You can use arbiters instead of data members but that's basically what it is.
[15:26:12] <k610> is "bind_ip = 127.0.0.1" enough to secure mongo ?
[15:28:34] <drag> Hi. When I do a query on mongo, is there a way to specify it to ignore case? For example, I have an object with name Ed and one with name ED. Can I have 1 query that returns both?
[15:29:29] <remonvv> drag, not through native operators
[15:29:40] <drag> remonvv, thanks.
[15:29:47] <remonvv> You can use $where or store an additional lowercased version of values in your document and query for that
[15:30:14] <remonvv> Both have significant downsides.
[15:30:47] <michael_____> remonvv: would here work a map reduce?
[15:30:54] <drag> remonvv, is this the where you are talking about: http://docs.mongodb.org/manual/reference/operator/where/
[15:31:03] <remonvv> drag: http://docs.mongodb.org/manual/core/text-search/ is here since 2.4
[15:31:31] <remonvv> drag: Right, but it's powered by the JavaScript engine embedded and thus slow. I'd avoid it for any project that isn't homework or a hobby project.
[15:31:45] <remonvv> michael_____: Potentially
[15:31:51] <remonvv> michael_____: Or the AF
[15:31:54] <drag> remonvv, thanks. I'll just use a normalized field
[15:31:59] <k610> somebody ?
[15:32:18] <michael_____> k610: and a strong password?
[15:32:24] <remonvv> drag: Works ;)
[15:32:45] <k610> michael_____, does the password really adds something ?
[15:32:55] <remonvv> k610: You should secure mongo by not letting anything connect to it that shouldn't. Binding IPs works although I don't see the value in binding it to 127.0.0.1. Local client?
[15:33:06] <Number6> k610: There are many ways to secure MongoDB. Binding it to localhost is one, setting up IP tables rules to block inbound accesses to port 27017 (mongoDB default) and a username & password
[15:33:16] <remonvv> k610: http://docs.mongodb.org/manual/core/security/
[15:34:16] <benza89> Hi . How I can remove a shard which is no more available ?
[15:34:39] <remonvv> use admin; db.runCommand({removeShard:"<shardname>"}) on one of your mongos
[15:34:50] <k610> remonvv, ssh tunnel is the way i'd like to go
[15:35:27] <remonvv> k610: All works, as long as the end result is that nothing can connect to your mongod that isn't allowed to. Up to you. Not a mongo specific thing.
[15:35:58] <remonvv> k610: Only thing is that if you're using mongo auth I feel you're probably doing something wrong on the security end of things.
[15:36:32] <k610> remonvv, i see some app could get corrupt and scan ports and access to a passwordless mongo
[15:36:46] <michael_____> k610: sure, in case one of your mates access if he shouldnt ;-)
[15:37:09] <benza89> I try the db.admincommand ({removeShard:"<shardname>"}) and then the move to primary but it did not work
[15:37:21] <benza89> the shard is no more reachable
[15:37:41] <remonvv> k610, there shouldn't be anything that can touch it ;) Anything/anyone that can get to your private network probably has enough access to make auth not matter.
[15:38:11] <remonvv> benza89, you mean it went down and still has chunks is primary for one or more dbs?
[15:38:13] <k610> remonvv, that's what i was thinking password are always going to end up in a config file anyway
[15:40:24] <k610> or is there a way to secure
[15:40:28] <benza89> @remonvv, yes exactly
[15:41:35] <mjburgess> what's happened ot $oid ? how can i convert a string to ObjectId in php now? (MongoClient)
[15:42:29] <Nodex> new MongoId($abc)
[15:42:39] <Nodex> $oid = new MongoId($abc);..
[15:43:05] <mjburgess> oh yes, i'm an idiot. n/m. Thanks!
[15:43:23] <Nodex> lol
[15:53:42] <benza89> How I can remove a shard which is no more available and still primary for a database ?
[15:54:41] <benza89> I can no more perform any query
[15:58:46] <remonvv> benza89, get it back up again
[15:59:12] <remonvv> benza89, there is no (easy) way to fix that without the shard being up since you have no replicas of that shard apparently.
[16:04:35] <rspijker> remonvv: On my storage issue, ran repairDatabase(). My previously ~140GB storage requiring set now uses 4GB :P
[16:06:11] <kali> i think we can safely assume it's fragmentation now :)
[16:08:01] <rspijker> yeah, I have a theory on what's causing it. All of my records are *almost* the same size. What happens is they all go into the same freelist bucket. But the freelist algorithm only checks 30 before moving on to the next bucket (which will be pretty much empty). Furthermore, they are sorted on size, so if a new record is larger than the 30 smallest ones, it doesn't pick anything from a freelist bucket.
[16:08:17] <rspijker> So I'm going to try using powersOf2Size now, see if that fixes it
[16:08:46] <kali> ha
[16:09:22] <kali> do you know for sure the issue will come back ?
[16:09:30] <kali> if you do nothing ?
[16:12:23] <benza89> Hi again , please can someone help me I am stuck !
[16:12:31] <remonvv> rspijker: Yeah, I've seen similar reductions. It's...not quite right.
[16:12:44] <remonvv> benza89: Sure, shoot.
[16:13:21] <rspijker> kali: pretty sure, yeah
[16:13:44] <rspijker> this is a pattern that will stay like this, so...
[16:15:55] <kali> rspijker: so you'll know pretty quickly if powerOfTwo will work or not. in case it does not i suggest you open a jira ticket, because discussions here are more revolving around mongodb usage than internals... you may get more help in the jira db
[16:16:24] <fredjiles> Does anyone know or can direct me on how to do either an aggregation or map reduce where I need to group by one field and get a count value based on whether another field $exists
[16:16:36] <remonvv> I think this came up way back when. At the time there was some resistence to have a period pass in the server that would clean that sort of thing up (find adjacent empty entries and join them into a single one, etc.)
[16:16:36] <kali> fredjiles: AF should work
[16:16:52] <rspijker> kali: sure, just wanted to run my understanding of all this by the channel, see if I missed something obvious :)
[16:16:53] <remonvv> To be frank I don't think the current solution is ideal.
[16:17:14] <fredjiles> hoping results would look like {user_id: ObjectId(), open: 0, closed: 100}
[16:17:31] <remonvv> fredjiles: What are you looking for? Info on how AF works or for someone to provide an example for that specific question?
[16:17:33] <rspijker> remonvv: I agree, I found a couple jira issues with suggestions for solutions to similar issues
[16:18:14] <remonvv> rspijker: There's a couple. Let's hope it gets addressed soon.
[16:18:20] <fredjiles> I looked at the AF docs, but I don't understand how to put in the $exists check
[16:18:25] <kali> fredjiles: AF should work. you need a $project with a condition to count your record as open on closed at some point
[16:19:45] <benza89> It is the same question : how can I remove one of my shard who went down and was prilay for some database
[16:19:52] <remonvv> fredjiles: $match and normal queries have the same query capabilities. You can use $exists in $match
[16:20:23] <remonvv> benza89: If you ask the same question you'll get the same answer: You have to recover the shard and bring it back up. It has data that currently exists nowhere else.
[16:20:39] <remonvv> benza89: Alternatively you dump what's left and start over with the data you can save.
[16:20:44] <kali> benza89: this is not a typical use case as discarding a shard discards data
[16:21:22] <remonvv> benza89: This is one of those "yay replica sets" moments
[16:23:31] <benza89> @remonvv , the problem that I have no way to do a back up , so if some data is lost it's not problematic for now I just want to get back the contol of my shard cluster
[16:23:57] <benza89> soory I disconnect that why i did not see yopur answer before
[16:27:21] <remonvv> benza89: What problem are you having now? Errors that it can't move primaries?
[16:28:46] <remonvv> benza89: The problem is that for those databases that had the lost shard as primary you will have lost ALL non-sharded data.
[16:30:53] <remonvv> benza89: If you can live with that and potentially cluster meta data corruption then you can do this : Go to db.databases and update the "primary" flag of all databases currently primaried on the lost shard. Then invoke a router flush on every mongos.
[16:31:11] <remonvv> That'll allow you to do removeShard on the broken shard.
[16:31:16] <remonvv> Which moves your cluster to a somewhat workable state.
[16:31:51] <_pash> can i have an incomplete search for a mongo object? for example if the name is Andrew, how can i find it with just and?
[16:31:53] <benza89> @remonv In my mongos I cant show dbs for example and I want to change this shard node by another one to execute some tests
[16:31:53] <remonvv> But I would consider your cluster in "borked" state after manually screwing with the config database
[16:32:20] <remonvv> benza89: Can you pastie a db.printShardingStatus() for me?
[16:32:36] <remonvv> benza89: I'm hearing some mutually exclusive things so it's getting a little confusing
[16:33:23] <remonvv> _pash: You can try $regex but MongoDB isn't very good at text search yet. 2.4+ has text search but I have little experience with it : http://docs.mongodb.org/manual/core/text-search/
[16:34:40] <z2z> n00b question about db-layout: many folders that conain many files (no folder nesting); both have metadata; possible query: all files x='z' within folders y='w'. Is there a smart way without denormalizing all the data into the file collection? is denormalization really not that bad? (classic sql and join does not work, because there is no fixed set of metadata keys) thanks a lot!
[16:35:24] <benza89> remonvv, the problem is that I can not execute any command (even db.printShardingStatus())
[16:35:24] <_pash> remonvv: is there any workaround? because i am trying to make a search bar, kind of like the autocomplete on facebook
[16:36:08] <remonvv> _pash: Look at $regex
[16:37:35] <remonvv> benza89: Are you sure it's just a down shard? A down shard doesn't suddenly disable the ability to work with your database.
[16:39:02] <remonvv> _pash: Note that it's not indexable (with the exception of beginning anchored, case sensitive regex) so it's not ideal
[16:40:29] <_pash> remonvv: maybe its a good idea to use another database espcially for this?
[16:41:15] <remonvv> _pash: Not sure if it's even a database you need. We usually store the auto-complete lookups for the first X characters in memory on the app servers.
[16:41:31] <remonvv> You don't really want to send a query to a database everytime your user types a character.
[16:42:33] <_pash> remonvv: the problem is that under one db i could have approx 500+ users i would need to search for, and there could be several DB's being searched at the same time, kinda like FB
[16:45:03] <Nodex> you also need to do your javascript right.... you start a timer when you press a key and kill it when you press another - starting one again and timeout the send.... you dont send for every char - just send the buffer every X ms
[16:45:12] <Nodex> saves about 75% of the requests
[16:45:27] <remonvv> _pash: So? To store a million usernames takes ~10-20mb of memory
[16:45:36] <fredjiles> remonvv, I have the first part working (http://pastebin.com/c7Zsj4t5) how do I do the second part to get the case where closed_date: {$exists: true} and store them in closed property
[16:47:14] <_pash> remonvv: Nodex: yes, but i wont get any suggestions. if my ajax sends the data of 'an' then i query the db for 'an' it wont give me a result, which i could suggest to the user
[16:48:11] <remonvv> fredjiles: You need to do a $match before the $group for your closed cases, then combine both $groups into a single result
[16:48:56] <Nodex> _pash, that's not the case because the last buffer is sent
[16:49:08] <Nodex> believe me, I have been doing this a very very long time
[16:49:18] <remonvv> _pash: Seriously, nobody that has more than 2 users does that against the db ;) Populate your username autocomplete cache during startup (sync or async) for the first X characters (if your max username length is higher than, say, 16) and autocomplete in memory
[16:50:06] <Nodex> I never auto complete less than 3 or more than 10 chars and anything that's large is thrown into redis in chunks
[16:50:09] <Nodex> or shards
[16:51:14] <Nodex> I can auto complete on 27M UK postcodes in about 24ms directly into mongo - that includes all rendering too
[16:51:17] <_pash> Nodex: i am very new to this, on the contrary to you, could you then suggest on how i should do it?
[16:51:19] <remonvv> NodeX: Redis is "in memory" I would argue ;) But yeah. Depends on usecase if you should have a max for auto complete though.
[16:52:24] <Nodex> _pash : firstly I would ngram my words / phrases and regex on that (in lower case)
[16:52:28] <_pash> Nodex: so lets say, i have a bunch of objects with names in a collection in mongo. and i send an ajax get request to the server, what do i then do with that data?
[16:53:09] <Nodex> for example .... andrew gets ['and', 'andr', 'andre', 'andrew'] and added to a cache (to avoid dupes)
[16:53:36] <remonvv> NodeX: Everybody can, but you normally shouldn't for systems that serve thousands of queries per second. It's just not something that should typically be thrown at the database. That's what Redis or other in-memory solutions are for. We often have ~100,000+ people in our systems at any one time and I wouldn't want them all throwing auto-complete queries into the database.
[16:54:18] <Nodex> remonvv : no, but I always have a caching layer so that doens't effect me
[16:54:31] <remonvv> Ah, in memory ;)
[16:54:39] <remonvv> Always what it boils down to really.
[16:54:49] <remonvv> And on that note. Food.
[16:54:50] <remonvv> bb
[16:55:22] <Nodex> _pash, you really have to model on your traffic tbh
[16:55:36] <Nodex> I don't know your query patterns, I can only advise what works for me
[17:04:37] <spicewiesel> hi all
[17:12:11] <z2z> n00b question about db-layout: many folders that conain many files (no folder nesting); both have metadata; possible query: all files x='z' within folders y='w'. Is there a smart way without denormalizing all the data into the file collection? is denormalization really not that bad? (classic sql and join does not work, because there is no fixed set of metadata keys) thanks a lot! (second attempt; somthing wrong with style of question? shou
[17:14:02] <spicewiesel> I created an admin user as described (http://docs.mongodb.org/manual/tutorial/add-user-administrator/), then I looged in to mongodb using "mongo admin -u admin -p" to check my shard status, but I am not allowed to do so. Could anybody help me with that?
[17:16:24] <spicewiesel> the message is: "not authorized for query on config.version", my user is "admin" and has the role "userAdminAnyDatabase"
[17:24:59] <pngl> I am trying to understand how the update $ works. Doc says: "...acts as a placeholder for the first element that matches the query document", but how is that match chosen? For instance, with collection [({a:[{b:0,c:false},{b:1,c:false}]}], update({'a.b':0,'a.b':1},{$set:{'a.$.c':true}) updates the element of the a array with b:1 regardless of the ordering in the array but dependent on the ordering in the query.
[17:25:59] <pngl> i.e. ({a:[{b:1},{b:0}]} updates the element of the a array with b:0
[17:46:58] <titosantana> I'm trying to use the scope function
[17:47:07] <titosantana> but it doesn't seem to be working or well documented
[17:47:44] <_pash> Nodex: if i were to use regex would that be efficient?
[17:47:57] <_pash> Nodex: how do i create an index with mongo?
[17:49:36] <Nodex> ensureIndex
[17:49:42] <Nodex> !google Mongo ensureIndex
[17:49:42] <pmxbot> http://docs.mongodb.org/manual/reference/method/db.collection.ensureIndex - db.collection.ensureIndex() - MongoDB
[17:49:51] <Nodex> I suggest you read the docs tbh
[17:54:47] <jayd16> Hi, I'm seeing a crash bug when on the mongo server. I can't really find a ticket in the mongo jira that's close, so my coworker made one. https://jira.mongodb.org/browse/SERVER-10285 Has anyone seen then? What else can we do to work around this?
[17:54:48] <_pash> Nodex: I will do when I get the time, the docs are massive, I learn best through practice.
[18:00:11] <_pash> Nodex: what does ensureindex actually do?
[18:01:09] <Nodex> creates an index
[18:01:16] <Nodex> (strangely)
[18:01:33] <_pash> alright why would i use that index instead of regex?
[18:02:06] <Nodex> ok, if you don't want to read the docs then I wish you good luck because I wont help soeone who cannot be bothered to help themselves :)
[18:32:00] <greenmang0> I removed huge data from our production mongo replset, but I noticed that there's no reduction in space, so after asking around and googling I realized that I have three options 1) repair db 2) compact 3) resync
[18:32:19] <greenmang0> since i am using journaling i can't use repair db
[18:32:31] <greenmang0> also compact is a blocking operation , i can't use it either
[18:32:39] <greenmang0> so i went for resync
[18:34:14] <greenmang0> what i was expecting is, if i add one more replset member as a secondary, it would sync with primary and take less space, and then i would promote it to primary
[18:34:19] <greenmang0> but that didn't happen
[18:34:54] <greenmang0> any suggestions about how i can reduce the disk space?
[18:36:04] <jayd16> I'm no expert but your plan should work I thought
[18:36:19] <jayd16> is your padding factor huge, maybe?
[18:37:10] <greenmang0> jayd16: what's "padding factor"?
[18:38:52] <jayd16> http://docs.mongodb.org/manual/core/write-operations/#padding-factor
[18:39:56] <jayd16> but you could maybe do your blocking operation on the slave and then promote it
[18:41:52] <greenmang0> jayd16: would it affect the performance of application?
[18:54:10] <awc737> anyone using Deployd? http://deployd.com/video.html
[18:55:07] <awc737> I'm wondering if it's using a normal complete version of mongo
[19:21:41] <_pash> how can i return only the first 8 results when using find?
[19:22:48] <_pash> nevermind .limit()
[19:34:23] <zachrab> how can i construct a query for returning a document in collection which has a subfield value that is not null
[19:34:24] <zachrab> ?
[19:36:31] <cheeser> $exists
[19:36:46] <ron> I always read that as 'sexists'
[19:37:22] <cheeser> it's $exy that way
[19:38:15] <zachrab> so db.collection.find( { "field.subfield" : $exists})
[19:38:26] <zachrab> cheeser: ?
[19:39:13] <ron> no. read the docs about the $exists syntax.
[19:39:13] <ron> mongodb has surprisingly good docs.
[19:39:13] <cheeser> http://docs.mongodb.org/manual/reference/operator/exists/
[19:39:13] <ron> it's almost annoying.
[19:39:14] <zachrab> k
[19:41:03] <zachrab> its returning records with value null
[19:41:35] <cheeser> can you pastebin a sample doc or two and the query?
[19:41:39] <ron> null is a value. it means its exists.
[19:41:45] <zachrab> got it had to use $nin [null]
[19:41:52] <zachrab> is that the best query?
[19:42:08] <ron> no, you just want the value to be not null.
[19:42:25] <ron> I imagine $nin offers higher computational complexity.
[19:42:50] <ron> keeping null values is quite often not something you want to do.
[19:42:52] <ron> imho.
[19:43:40] <cheeser> though missing values plays havoc with indexing.
[19:44:22] <ron> well, I normally don't trust mongo to index so that's okay :)
[20:16:49] <NaN> how do I run the mongodb-server once it's installed?
[20:16:56] <cheeser> mongod
[21:24:35] <NaN> does mongo-10gen-server has issues with fedora 18? I can't start the service
[21:30:40] <zachrab> what is NumberLong("1374191450121") equivalent to?
[21:30:58] <ron> 1374191450121.
[21:31:05] <zachrab> ron: really?
[21:31:14] <ron> no. I lie.
[21:31:20] <zachrab> ron: ha k
[21:49:21] <zachrab> how can i make a query with multiple conditions
[21:49:21] <zachrab> ie
[21:49:47] <zachrab> db.collection.find( { asdf : asdf} AND { asdf : asdf } )
[21:50:14] <cheeser> http://docs.mongodb.org/manual/reference/operator/and/
[21:52:40] <retran> i believe it's db.collection.find({field1:"asdf",field2:"asdf"})
[21:52:56] <retran> just learn to 'think' in javascript/json instead of SQL
[21:54:25] <retran> above example is implicit '$and'
[23:13:17] <dougb> Is there a better way of seeing what's happening with mongoimport? I'm trying to import a 2 GB collection, but it's stuck at filesize: 0
[23:22:05] <japandroid> exit
[23:23:14] <japandroid> Has anyone ever had problems using the next() function?
[23:23:58] <japandroid> When I try the_collection.find().next(), gives me an error
[23:24:24] <double_p> besides the ones having "issues"?
[23:25:00] <japandroid> Issues?
[23:25:50] <double_p> prblems