PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 31st of August, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:49:27] <fjay> random question.. if i have a secondary mongodb cluster .. that I do a mongorestore on every day from a backup... will deletes 'casscade' when i run the resore?
[00:49:38] <fjay> or.. will i need to nuke the db first.. then restore
[04:16:38] <brianpWins> After I get mongo installed on my server what steps should i take for securing it ?
[05:10:10] <alexluya> Hello,can anyone give a suggestion to prepare mongodb data for apache mahout(data mining tool)?
[05:21:30] <ron> alexluya: we don't 'interact' between the two directly.
[05:22:36] <alexluya> I know,just want to get some suggestions,
[05:23:21] <alexluya> I think,this is a real and big requirement,someone should have some experience
[06:16:12] <Gargoyle> Anyone around?
[07:09:35] <Gargoyle> This seems to be happening a lot since upgrading to 2.0.7 from the 10gen repo. Running ubuntu 12.04. http://pastie.org/private/i0cl5diq7wxdjwckuvgisw
[07:14:19] <NodeX> you usre it's caused by mongo?
[07:14:49] <Gargoyle> Looking at the backtrace, suggests it's happening when mongo tries to connect.
[07:15:26] <NodeX> does it just fail the connection or does it crash mongo ?
[07:15:35] <Gargoyle> seems to have started the other day when I switched from 2.0.4 from the std 12.04LTS, to 2.0.7 from 10gen
[07:15:42] <NodeX> 2.2 is out
[07:15:50] <NodeX> you tried an upgrade?
[07:16:03] <Gargoyle> Not yet.
[07:16:52] <Gargoyle> less than a week from going live - wasn't going to.
[07:17:04] <NodeX> :/
[07:17:32] <Gargoyle> Although I am sure I could make use of the aggregation framework if I was forced into it!
[07:17:50] <NodeX> it has perrormance benefits aswel
[07:17:58] <NodeX> and global lock is no mor
[07:18:00] <NodeX> more *
[07:18:33] <Gargoyle> Is there any thoughts on reverting a database backwards?
[07:19:01] <Gargoyle> so if 2.2 causes problems, then maybe I would be forced into going back to 2.0.4
[07:19:29] <ron> funny, we're also less than a week before going live, and that's why we won't upgrade to 2.2 now.
[07:19:59] <ron> almost gave our system integrator a heart attack when I told him we need to upgrade all our servers to 2.2. :p
[07:20:36] <kali> somebody has 2.2 on prod here yet ?
[07:20:41] <NodeX> I seemlesly upgraded mine 1 day before going live
[07:20:49] <NodeX> I have 3 apps on 2.2 production
[07:21:02] <kali> I'm curious about the real impact on perf
[07:21:05] <NodeX> 2 of them I upgraded without switching sites!
[07:21:19] <ron> we have too many servers, too many configurations and too much other work to do to take the risk. we'll do it in a few weeks probably.
[07:21:31] <NodeX> kali : the only thing I have noticed so far is resident memory has dropped and virtual increased
[07:21:49] <kali> NodeX: mmmm ok
[07:21:52] <ron> locking should be better, no?
[07:22:02] <NodeX> it's a little faster on certain things, I dont notice the lock all that much
[07:22:13] <kali> ron: it should, but i don't have a problem with it :)
[07:22:15] <NodeX> I dont do map/reduce and I dont use aggregation
[07:22:20] <ron> I imagine it'll mostly affect write-intensive apps.
[07:22:28] <NodeX> mine are read heavy tbh
[07:23:27] <ron> our would end up being write intensive with more users, but since we're not even live yet, there should be a very low initial load at first.
[07:24:34] <NodeX> what does your company do ron?
[07:26:14] <ron> that's right, kali, but in a week from now we're going out of stealth mode, so I should be able to link you guys to information about what we do then.
[07:26:29] <NodeX> sounds very java like
[07:26:31] <NodeX> LOL
[07:26:33] <ron> haha
[07:26:41] <ron> well, we don't use only java.
[07:27:47] <ron> though the server side is pure java.
[07:27:48] <kali> we got outed two days before the end of the embargo by tech crunch. most interesting two days of my life so far
[07:28:06] <NodeX> what do you do kali?
[07:28:22] <NodeX> you/your company
[07:36:00] <kali> NodeX: fotopedia
[07:36:37] <kali> NodeX: and i'm the database guy, more or less
[07:37:41] <NodeX> cool
[07:41:03] <Gargoyle> replica set now running 2.2.0
[07:41:14] <Gargoyle> Lets keep an eye on this today!
[07:41:28] <Gargoyle> .. and toes...
[07:41:34] <Gargoyle> … and arms ...
[07:41:46] <Derick> elbows?
[07:41:48] <Gargoyle> Wow! Typing is hard like this! ;)
[07:42:01] <kali> should be safe enough
[07:42:33] <NodeX> 2.2 to take over the world - news just in!
[07:42:59] <Gargoyle> I also now have "tail -f" running on the apache error.log on both web front ends.
[07:44:54] <Gargoyle> and my mongo.log on the primary...
[07:44:57] <Gargoyle> :P
[07:59:41] <[AD]Turbo> hola
[08:03:17] <Gargoyle> Can I stop mongo from logging connections? This log file is going to be HUGE by the end of the day!
[08:08:48] <NodeX> http://www.mongodb.org/display/DOCS/Logging
[08:08:57] <NodeX> --quiet surpresses connections
[08:09:05] <NodeX> http://www.mongodb.org/display/DOCS/--quiet
[08:11:27] <Gargoyle> NodeX: Can that just go in the config file as quiet = true ?
[08:15:23] <NodeX> Gargoyle : never tried but I dont see why not
[08:18:46] <Gargoyle> Hmmm.
[08:19:11] <Gargoyle> Restarted a *SECONDARY* and the app bombed with a load of connection errors!
[08:19:31] <Gargoyle> Is there something I should do in my code to reconnect?
[08:22:01] <NodeX> when using --quiet ?
[08:23:05] <Gargoyle> I set it in the config, and then restarted mongo. but it was a secondary node.
[08:23:32] <Gargoyle> then all of a sudden, my apache error log filled up with connection exceptions, and I had to restart apache.
[08:24:05] <Gargoyle> Should I be checkking for the exception in code, and manually triggering a reconnect - or is this something that the driver is not handling properly?
[08:27:11] <NodeX> try / catch in your code
[08:29:00] <Derick> Gargoyle: which version of the driver?
[08:29:40] <Gargoyle> v1.2
[08:29:52] <Gargoyle> from github
[08:29:53] <Derick> i'll throw out 1.3.0beta2 today or monday
[08:30:05] <Gargoyle> :)
[08:30:44] <Derick> which exception are you getting btw?
[08:32:16] <Gargoyle> Derick: http://pastie.org/4627401
[08:33:44] <Derick> oh
[08:33:54] <Gargoyle> Actually, that could be bad code - looks like a git merge (other developer) has removed the replica set config! :(
[08:34:04] <Derick> :-)
[08:34:04] <Gargoyle> Need more Tea!!
[08:34:06] <Derick> yeah
[08:34:13] <Derick> this doesn't look like driver weirdness
[08:34:18] <Derick> Gargoyle: where are you based?
[08:34:28] <Gargoyle> Liverpool.
[08:34:32] <Derick> ah
[08:35:46] <Gargoyle> Oh no. the correct config is passed, overriding the default.
[08:36:53] <Gargoyle> So assuming my connection string is "mongodb://ironton:27017,kenton:27017,kirtland:27017"
[08:37:08] <NodeX> Liverpool is only 20 mins from me!
[08:37:46] <Gargoyle> If I take one of those servers offline (a secondary for example), should the connection automatically switch to another one?
[08:38:01] <Gargoyle> NodeX: Where you from?
[08:38:13] <NodeX> I live near Chester now, from south originaly
[08:41:19] <Gargoyle> This is really sad...
[08:41:40] <Gargoyle> It's still August (just), and I have had to put the heating on!
[08:41:49] <NodeX> it's not warm :/
[08:44:38] <kali> chill in Paris too, this morning
[08:45:02] <Gargoyle> I'll just leave it on for an hour - "Just to take the chill off" as mum would say! :)
[08:46:31] <NodeX> another bad summer for the UK
[08:47:06] <Gargoyle> Yeah. That's global warming for you!
[08:47:14] <Gargoyle> UK gets colder!
[08:47:21] <NodeX> everywhere else gets hotter
[09:04:04] <Gargoyle> Awww crap! http://pastie.org/4628147
[09:05:24] <Derick> hmm
[09:06:11] <Gargoyle> Derick: We have commercial support, should I raise an official ticket?
[09:06:51] <Gargoyle> Was hoping to save it for when we have real problems under production load!
[09:06:59] <NodeX> I just had a massive load of "Broken pipe" errors when trying to do a rather large update
[09:07:02] <Gargoyle> s/when/if ;)
[09:07:07] <NodeX> perhaps they're related
[09:07:59] <Derick> Gargoyle: I'd rather have you test the new code if possible. In case you do send in a CS ticket, please try to create a real backtrace - one sec, will contact you in PM in a bit
[09:08:17] <Gargoyle> Derick: OK.
[09:09:37] <Derick> having some network issues
[09:34:49] <NodeX> Has something changed in 2.2 with regards to safe writes, I have a query that writes the the DB then a function that reads it afterwards (for a ratings thing), if I read after I wrote with safe write on i get nothing returned, if I run the query again I get the expected results
[09:39:36] <Gargoyle> NodeX: Don't say things like that!
[09:39:49] <Gargoyle> Almost all our writes are "safe"
[09:40:39] <Gargoyle> Actually. Must check what options I am passing to update() calls...
[09:42:29] <NodeX> it seems that my upsert was not previously "safe" and the update to 2.2 made my query even faster so there was a race condition
[09:42:37] <NodeX> switched to a safe update and sorted ;)
[09:42:41] <NodeX> safe upsert*
[09:43:27] <Gargoyle> ha ha
[09:43:29] <Gargoyle> :)
[09:49:05] <NodeX> 14ms including the round trip and the render of the response - not to shabby
[09:49:28] <Gargoyle> Could do with your help on our project! :P
[09:49:45] <Gargoyle> Page generated in 3.4020 seconds, from host hilliard, using 6,966.70KB of RAM (env: beta)
[09:49:48] <Gargoyle> Owch!
[09:50:00] <NodeX> wth
[09:50:08] <NodeX> 7mb of ram
[09:50:09] <Gargoyle> much tweaking needed!
[09:50:26] <NodeX> my total page load including rendering is max 1.2 seconds
[09:50:43] <Gargoyle> most likely bits of code returning 100's of rows and only drawing 3 on the screen!
[09:50:44] <NodeX> from request to </html> including all browserside parsing of css/js
[09:51:21] <Gargoyle> That's a time from PHP code. Not even sure I want to see the browser time at the moment!
[09:52:30] <Gargoyle> PHP Fatal error: Uncaught exception 'MongoConnectionException' with message 'Cannot assign requested address'
[09:52:39] <Gargoyle> Oh… what now...
[09:53:43] <Derick> that is a new one...
[09:53:48] <Derick> ipv6 stuff perhaps?
[09:54:09] <Gargoyle> Derick: Could be. Hadn't thought of that!
[09:56:18] <Gargoyle> Derick: Any way I can check?
[09:57:04] <Derick> strace might tell you what's going on
[10:04:22] <Gargoyle> Removing virtually all calls to save($doc) in favour of update({..}, {$set:{}) calls.
[10:07:45] <Rhaven> Hi all, someone can help me with "stale config detected for ns" message that appear often in log ?
[10:10:05] <NodeX> Gargoyle : save() is really only a helper for upsert
[10:42:06] <Rhaven> Hi all, someone can help me with "stale config detected for ns" message that appear often in log ? I'm using version 2.0.6
[12:45:58] <gigo1980> hi all i have a cluster with some nodes…. i have the error that my mongos process client connection block if i enter "show dbs"
[12:46:13] <gigo1980> in the mongo router logs i can not found anything
[13:41:06] <Rhaven> Hi all, someone can help me with "stale config detected for ns" message that appear often in log ?
[14:16:48] <yak_ouza> Hello everyone
[14:18:21] <octalmind> I've got a performance issue that I would like to discuss, maybe somebody could help me
[14:18:25] <octalmind> *?
[14:18:31] <Jester01> me too! LOL
[14:18:40] <ppetermann> it might help to describe your issue
[14:18:43] <ppetermann> maybe
[14:20:49] <octalmind> @ppetermann indeed, but I didn't want to be rude ;)
[14:21:13] <ppetermann> octalmind: in most chats people see metaquestions as rude opposed to asking what you want to know
[14:21:17] <Derick> octalmind: it's ruder to ask whether you can ask, then to actually do it
[14:21:41] <ppetermann> =)
[14:21:53] <Jester01> <kali> i don't know if the counted btree made the cut for 2.2
[14:21:58] <Jester01> I have tested, but apparently not
[14:22:06] <Jester01> anybody know what commit to look for in git?
[14:22:41] <octalmind> ok :) so - I've got a collection of 2.6 millions points with a location field containing longitude and latitude, a stopTime and a number field. I need to find the neigbors for all this points with a very limit hardware (aka my macbook pro)
[14:22:59] <Jester01> if it's already implemented, that is
[14:24:03] <octalmind> unfortunately it takes 100ms to find the neighbors for one point, and It will took me year to perform the task. I have check my indexes, but is there any way to tweak my database to speed up geo spatial query ?
[14:24:12] <octalmind> limited*
[14:25:55] <kali> Jester01: i think it's just planned for 2.4
[14:26:27] <Jester01> ok, thanks
[14:26:35] <ppetermann> octalmind: are you sure its mongodb thats the problem? i could imagine that you run out of ram / are swapping there
[14:29:26] <NodeX> octalmind : why are you running it on a macbook pro ?
[14:29:37] <NodeX> surely in production this will make no difference
[14:30:23] <octalmind> @ppetermann yes I've got approx 1Go of ram free, It doesn't seem to swap.
[14:30:46] <NodeX> if you want a faster query in geo spatial I suggest you use a bounding box and not a sphere as it's faster
[14:31:30] <octalmind> @NodeX Because I do not have a production yet, neither I have server yet. I am a bit constrained at my work :P
[14:32:02] <octalmind> @NodeX and I am aware that this isn't the best hardware to perform such a task
[14:32:04] <octalmind> :)
[14:32:54] <NodeX> use a bbox
[14:33:47] <octalmind> @NodeX ok thx :) does 100ms seems to be a huge time for a geospatial query ? I am afraid to have missed something in my setup.
[14:33:58] <NodeX> depends on the paramters
[14:35:35] <NodeX> can you pastebin the query with an explain on it?
[14:39:59] <octalmind> @NodeX yes, here it is : http://pastebin.com/szchcMJp
[14:41:40] <NodeX> can you pastebin the index you have set on it
[14:43:15] <octalmind> yes, http://pastebin.com/qMCVm9Se
[14:44:47] <Gargoyle> If I had category->item->reviews
[14:45:19] <Gargoyle> With each level being one to many (so a category has many items, and items have many reviews)
[14:47:22] <Gargoyle> Is it possible to fetch all the reviews for a categoy (which I do save in the review), but - I need the ones for a specific item to be first, and page the results!
[14:48:55] <Gargoyle> We are talking 1000's of reviews per item, so I don't think loading them all and sorting is an option
[14:50:13] <NodeX> octalmind : the only way you're going to speed it up is to use a box not a sphere
[14:50:48] <NodeX> Gargoyle : can you explain it a bit better, I dont understand what you're trying to do
[14:50:50] <octalmind> @NodeX ok thank you very much for the help :)
[14:50:55] <NodeX> no probs
[14:51:27] <NodeX> on a server that wont be all that slow
[14:52:14] <Gargoyle> NodeX: Items belong to a category. and items have many reviews. When viewing an item, I want to show all reviews for that category, but have the ones for the item you are looking for, first.
[14:52:21] <Gargoyle> As a paged result set
[14:53:42] <NodeX> in 2 collections or 1 ?
[14:53:46] <Gargoyle> 1
[14:54:29] <NodeX> it will naturaly be like that if you sort natural -1
[14:54:49] <NodeX> provided the embedded reviews are in that order
[14:55:20] <Gargoyle> sorry. The reviews are not embedded. miss read you there!
[14:55:36] <Gargoyle> 2 collections, items and reviews
[14:57:50] <NodeX> you're going to have to sort it appside probably
[14:59:49] <Gargoyle> I think that's going to be too slow. Thanks though, just wanted to make sure there wasn't something I was missing.
[15:00:43] <Rhaven> Hi all, someone can help me with "stale config detected for ns" message that appear often in log ?
[15:15:28] <Almindor> hey
[15:15:48] <Almindor> I'm upgrading a replset (2 arbiters, 3 dbs in the set)
[15:16:01] <Almindor> I updated one secondary node but it didn't go back up as a replset
[15:16:24] <Almindor> (cent OS 6 using 10gen repos just did yum update mongo-10gen mongo-10gen-server)
[15:16:35] <Gargoyle> Almindor: config reset to default?
[15:16:40] <Almindor> yum does that???
[15:16:44] <Gargoyle> dunno
[15:16:50] <Gargoyle> apt asks
[15:21:03] <NodeX> there was some config (startup) changes between 2.0.7 to 2.2
[15:21:14] <Almindor> the init script changed
[15:21:47] <Almindor> godamnit yum you shouldn't override these things
[16:15:27] <NodeX> I officialy hate all versions of internet explorer, 2 hours debugging a fricken typo
[17:21:41] <Gargoyle> Is passing true to cursor->count() a new thing?
[17:24:36] <Derick> dunno
[17:29:59] <Gargoyle> It's quite possible I just didn't notice it before! Especially how mashed my head is today!
[17:30:41] <Gargoyle> cursor->count() = size of collection. cursor->count(true) = size of result set
[17:32:18] <Gargoyle> nope. it's mostly me - :)
[17:32:28] <Gargoyle> I think it's time to quit and have a beer!
[17:33:29] <Gargoyle> When your done building your query params array, it's helpful to actually pass it into the ->find() method! :S
[18:08:23] <Martin_> Hello guys. I'm having a bit of a problem: We just launched our social game yesterday on facebook that's using mongodb on AWS. I'm heaving a bit of a headache because we are having only ~600 player playing at the same time and ours servers are processing through the roof. But, our server is sharded in two different replica sets, and the strange part is that even though our data is split, on the servers from the first shard are bei
[18:08:30] <Martin_> have almost no requests whatsoever
[18:08:50] <Martin_> Is it a problem in PHP maybe?? or did I configure something wronge?
[18:13:46] <kali> are you sure the problem lies with a sharded collection and not an unsharded one ?
[18:14:56] <Martin_> yes, the problem lies in the sharded collection
[18:16:20] <kali> ok, what kind of queries are hammering you ? read ? insert ? or update ?
[18:16:35] <Martin_> reads, for sure
[18:16:46] <Martin_> it's really really high on processing
[18:18:18] <kali> so it looks like the shard key is not spreading the load
[18:18:49] <kali> you know whspecific collection is the probleme ? how is it sharded ?
[18:23:35] <Martin_> I think it's some of the collections that are having problem... it's sharded by our internal use user id
[18:26:39] <TTimo> hello .. newb here. I'm confused why the second form in this isn't working: http://pastie.org/4641574 ?
[18:26:43] <kali> you need to identify the hammering queries and understand why the shard key choice make all of them going to the same chunk
[18:26:45] <TTimo> if someone care to explain
[18:27:03] <queso> When I try connecting to a remove mongodb I get: Error: couldn't connect to server ... src/mongo/shell/mongo.js:93 exception: connect failed Could I have some help diagnosing this?
[18:27:13] <queso> s/remove/remote/
[18:28:29] <kali> queso: is the server running ? can you connect locally ? can your server have a firewall ? can your client have a firewall ?
[18:31:21] <kali> TTimo: are you the TTimo I knew 10 years ago on ircnet ?
[18:31:41] <TTimo> err .. that's quite possible. in what context ?
[18:31:54] <kali> #francaise ?
[18:31:58] <TTimo> yes!
[18:32:04] <kali> :))
[18:32:07] <TTimo> ahah yeah I remember a kali from #francaise now
[18:32:33] <queso> kali: ah. must be some firewall thing that was preventing me. thanks.
[18:34:18] <kali> TTimo: so... $not and null are a bit tricky
[18:34:56] <TTimo> I figure that's because it'll match if the field is not present as well
[18:35:07] <kali> yep
[18:36:22] <kali> to match "present and null", { last_updated:{ $type: 10 }} shoud lwork
[18:44:15] <TTimo> k. I understand how that happens now
[18:44:18] <TTimo> ty
[18:48:40] <Martin_> I just discovered that the main problem in the oplog.rs collection
[18:48:44] <Martin_> it's taking like 3000ms
[18:48:58] <Martin_> can I do something about it?
[18:50:44] <kali> Martin_: this is the operation log, not a real collection
[18:51:12] <Martin_> but why it's taking so long? and why the other shard is not?
[18:52:53] <kali> Martin_: i don't think the oplog is your problem
[18:53:16] <Martin_> yeah... mongotop and mongostat didn't give anything
[18:53:35] <Martin_> I don't know what to do to find out why that's happening
[18:54:01] <kali> you need to find out what are the query pattern that is killing you
[18:54:16] <kali> either by studying/profiling your php app
[18:54:23] <kali> either by profiling on the mongo side
[18:54:58] <kali> you can try to run the profiler like here
[18:55:39] <kali> and it may help if you describe your setup, too
[19:46:41] <vicelow> someone knows how to do a query in a nested document of a nested document :s
[19:47:28] <vicelow> Im using mongoose in node.js
[19:51:09] <wereHamster> vicelow: you know how to do it in the mongo shell?
[19:53:19] <vicelow> wereHamster, yes but the problem is there are a lot of data in this document, then If I get all the data the query is too slow I would like to do the query using $gte and $lt but I dont know how
[19:56:30] <wereHamster> vicelow: if you know how to do the query in the mongo shell, then you also know how to do it in mongoose
[19:59:30] <sqwishy> Is there a more efficient way to write this query? http://pastebin.com/CPhmSV6N
[20:00:07] <sqwishy> The ors should be in a list ...
[20:27:22] <vicelow> wereHamster, but I don't know how to do
[20:27:30] <nick_h> is it possible to create an index that only includes documents that match a query? E.g. create index {foo: 1, bar: 1} on documents that match {active: true}
[20:27:41] <vicelow> do you know it?
[20:28:02] <wereHamster> vicelow: you just said you know it.
[20:28:14] <wereHamster> a asked you, you said 'yes'
[20:28:35] <vicelow> but without using $gt and $lt
[20:28:38] <vicelow> in the nested document
[20:28:51] <wereHamster> so it's 'no'
[20:29:04] <vicelow> right... and you?
[20:29:23] <nick_h> vicelow: how about: db.foos.find( { "nested_level_1.nested_level_2.some_property": "some value" } )
[20:29:45] <crudson> nick_h: sparse index will be your closest bet if you want to not index every document, but it will still be on the documents for which the index is specified, otherwise it makes little sense. If you're going to query on 'active', then include it in the index, and have a sparse one.
[20:30:48] <nick_h> crudson: i considered a sparse index, but that'll still index the docs that have "active" set to false, which is a waste of RAM
[20:31:57] <crudson> nick_h: is it possible to represent 'false' for those documents by just not having the attribute?
[20:32:21] <nick_h> crudson: it's possible, but would be a really ugly hack
[20:32:54] <nick_h> and would require additional update queries to implement
[20:33:29] <vicelow> nick_h, I get all the data with this
[20:34:01] <nick_h> vicelow: that's what you asked for about 50 minutes ago..
[20:34:27] <vicelow> yes :D
[20:36:31] <crudson> nick_h: I appreciate that, but your primary concern re. your document structure is how it is going to be used. If it's deemed correct to have false/true for that key then you won't be able to sparsely index on it, I'm afraid.
[20:37:19] <nick_h> crudson: yeah, i understand. thanks for your advice here, mate
[20:38:41] <crudson> nick_h: anytime. How many docs in the collection, out of interest?
[20:40:09] <nick_h> crudson: only 83K at the moment: http://pastie.org/private/otbf6ts9boa2iqqmn8eoya
[20:40:31] <nick_h> crudson: but it's going to expand quickly, and exponentially
[20:40:40] <nick_h> (rather than linearly)
[20:46:56] <crudson> nick_h: I hear you. those are very small documents, but it's the count obviously that impacts index size. It's good you're thinking about it in advance.
[20:48:50] <nick_h> crudson: that average size doesn't seem right, actually. here's an example doc in the collection. that's a lot more than 289 bytes, no? http://pastie.org/private/o2ao25fkyf2qeokyhk3ttq
[20:49:49] <tanob> hey guys, I'm using Ruby's Mongoid and i see them recommending some options but I can't trace them to the gem, I believe the safe options are passed to Mongo and I can't find the official doc about the options, do you know where can I find?
[20:49:58] <crudson> nick_h: well objectid is 12 bytes, couple of booleans and a string
[20:50:10] <crudson> nick_h: seems about right
[20:53:24] <nick_h> hm
[20:56:03] <crudson> nick_h: Object.bsonsize(someObject) will tell you for a particular object to verify it
[20:57:41] <icenine457> hi all
[20:58:10] <icenine457> can anyone explain why this query is throwing "can't have . in field names" when im clearly trying to use the positional operator? db.surveyTemplates.update({'QuestionConfigurations' : {$elemMatch: { 'Title' : 'PreferencesCollegeLevelSpanishCourses'} } }, {'QuestionConfigurations.$.Options' : 'Options:0~1~2~3~4~5~6~7~8~9~10~11+'}, false, true);
[21:01:42] <icenine457> http://pastie.org/4642320 here's the query cleaned up a bit also
[21:07:52] <crudson> icenine457: First comment is $elemMatch with a single item makes no sense. Just do {'QuestionConfigurations.Title':'PreferencesCollegeLevelSpanishCourses'}
[21:09:45] <bcardarella> Where is the mongo db stored by default?
[21:11:56] <icenine457> crudson: i did that first but got the same error
[21:12:39] <nick_h> bcardarella: check your MongoDB config file for the "dbpath" setting
[21:13:12] <bcardarella> nick_h: I have that and in that path there is only mongod.log
[21:13:28] <bcardarella> nick_h: this is on linode and they lost power, when it came back the data directory is gone
[21:13:30] <_Tristan> if I have some users, and they look something like this: {name: "Tristan", pets: {cats: 2, dogs: 1}}, can I select all users with one or more cats?
[21:13:39] <crudson> icenine457: I also think you probably want to use {$set:{'QuestionConfigurations.$.Options' :'Options:0~1~2~3~4~5~6~7~8~9~10~11+'}}
[21:13:45] <icenine457> riiight
[21:13:48] <icenine457> damn i forgot set
[21:13:50] <icenine457> thanks!
[21:13:53] <crudson> icenine457: otherwise it will barf
[21:13:56] <crudson> icenine457: cool!
[21:14:03] <icenine457> yeah i ran into this before and totally spaced on it
[21:14:31] <crudson> icenine457: actually it will probably try to replace the matched documents with an attribute that contains the literal '$'
[21:14:39] <crudson> icenine457: ==bad
[21:18:13] <sqwishy> Is there a better way to write this query? http://pastebin.com/p6Kj6bJ5
[21:18:47] <bcardarella> nick_h: nm, I figured it out. Thank you!
[21:21:20] <icenine457> crudson: i ended up with a query that worked. thanks though :)
[21:21:36] <crudson> icenine457: nice, nice
[22:43:05] <Almindor> how do you use skip() and limit() with java mongodb driver?
[22:43:34] <Almindor> ow lol nwm
[22:43:41] <Almindor> nvm even