PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 19th of June, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[06:34:45] <acidjazz> hey all.. oddest thing even though i know im applying a sort->skip->limit on my mongo query it for some reason returns all the rows no matter what.
[06:44:59] <acidjazz> did something change with php+mongo and limit()? am i taking crazy pills?
[07:25:17] <MatToufoutaf> hi people
[07:28:25] <MatToufoutaf> I'd like to set failIndexKeyTooLong=false in the config, but I don't find how to do this with the old config format, do I have to rewrite my config file to YAML for it to work? (if so, is there an easy way to convert a format to the other?)
[07:29:38] <Boomtime> MatToufoutaf: the old format is not being maintained, if the option you want is new then it won't exist there
[07:49:34] <MatToufoutaf> Boomtime, thanks, so, is there a way to convert easily the old format to the new one? or do I have to search through the documentation to find to which section every old config entry belongs?
[08:24:38] <luc4> Hello! I would like to set the key in a nested object of a document with an update query. Something like adding k3 to {keys: {k1: v1, k2: v2}} but where k3 is stored in a variable. Something like this: http://pastebin.com/r3DCHQBH. Any way to do it?
[08:39:09] <luc4> I found what I was looking for: http://stackoverflow.com/questions/6702450/variable-with-mongodb-dotnotation.
[09:03:36] <mitereiter> hi all
[09:03:53] <mitereiter> i have a sharded system
[09:05:01] <mitereiter> i made an index and got the error: key values too large to index
[09:05:59] <mitereiter> but the Index were created on some shards, because when I want to insert on those shards I get the error value to large for index
[09:06:39] <mitereiter> I cant see the index with db.col.getIndexes()
[09:06:51] <mitereiter> is this the normal behavior
[09:07:05] <mitereiter> can I drop the index trough mongos?
[09:09:24] <rusty78> 样
[10:26:33] <mitereiter> I have a sharded system
[10:26:33] <mitereiter> I made an index and got the error: key values too large to index
[10:26:33] <mitereiter> but the Index were created on some shards, because when I want to insert on those shards I get the error value to large for index
[10:26:34] <mitereiter> I cant see the index with db.col.getIndexes()
[10:26:34] <mitereiter> is this the normal behaviour?
[10:26:34] <mitereiter> can I drop the index trough mongos?
[11:11:10] <max2000> Hi, I'm having a small challenge with mongodb 3.0.4 and I was hoping some of you may have an idea what's going on. On this mongo I have the rest interface on and the http interface on. When I have authorization turned off I can access http://server/ just fine. When I turn authorization on it asks me for a username and password. Any username I can successfully log in with through 'mongo' on the cli is not accepted by the web interface
[11:11:16] <max2000> Should users get a special role or something in order to be able to access the http interface?
[11:12:18] <joannac> max2000: the rest interface doesn't support scram-sha1
[11:12:51] <joannac> neither does the http interface
[11:13:14] <max2000> so how to authenticate then? have a user with mongodb-cr ?
[11:14:42] <joannac> downgrade to 2.6, redo your users, etc
[11:15:26] <joannac> "If you must use the REST API, please control and limit access to the REST API. The REST API does not include any support for authentication, even when running with authorization enabled."
[11:19:49] <max2000> thanks for the details. I think I'll accept the situation and wait for this: https://jira.mongodb.org/browse/SERVER-17390
[11:22:18] <joannac> sure, but there's no fix version yet.
[12:10:16] <mitereiter> I have a sharded system
[12:10:16] <mitereiter> I made an index and got the error: key values too large to index
[12:10:16] <mitereiter> but the Index were created on some shards, because when I want to insert on those shards I get the error value to large for index
[12:10:16] <mitereiter> I cant see the index with db.col.getIndexes()
[12:10:16] <mitereiter> is this the normal behaviour?
[12:10:17] <mitereiter> can I drop the index trough mongos?
[14:05:23] <leandroa> hi
[14:06:24] <leandroa> I have a schema that includes an object of array of objects, what's the easy way to do an increment to a value in the deeper object?
[14:06:35] <leandroa> this is the scheme: https://gist.github.com/lardissone/c66eca0a67aadbbbe2ed
[14:07:21] <leandroa> I need to increment `values.hourly.5.clicks` for object with tool == page-view, for example
[14:13:07] <leandroa> I think I got it.. db.coll.update({_id: {..}, 'values.hourly.5.tool': 'page-view'}, {$inc: {'values.hourly.5.clicks': 1}})
[14:18:45] <s2013> if i have dates liek this 06/01/2015 how do i query by that? like greater than for example
[14:18:59] <s2013> do i need to convert it like new Date("06/01/2015")
[14:25:47] <s2013> nvm.. but im using mongoose and i have a product those date is 06/17/2015 but it doesnt appear even though my query is query.lte
[14:26:38] <s2013> oh nevermidn i think i know why
[14:28:01] <watmm> Hey, wondering what the best way of restricting inbound connections to a hostname is
[14:32:43] <fxmulder> so I have a 6 node cluster, 2 replica sets of 3 nodes each. I recently setup sharding so the first replica set migrated half its data to the second replica set
[14:33:16] <fxmulder> the first replica set didn't shrink in disk usage as expected but it is still growing and is about to run out of disk
[14:45:50] <fxmulder> if I stat() the collection in the two different replica sets, the first replica set has almost double the count of the second
[14:47:41] <fxmulder> did the first replica maybe not free the migrated data?
[14:47:41] <no-thing_> Hello, could someone comment on my problem? if i execute on database db.printCollectionStats(); command i don't see any sharded collections (all are sharded:false) yet in sh.status() i see this ouput his output? http://codepaste.net/49euep . Why is that? What that "database." <-- dot means?
[15:07:00] <no-thing_> why there is no such command as sh.disableSharding ? :) only one way ticket?
[15:07:31] <StephenLynx> where we are going, we don't need to disable sharding >:3
[15:10:07] <no-thing_> sometimes something happens unexpected and sharding does not work as it should etc. until then i think there should be such function >:3
[15:12:04] <StephenLynx> yeah, just playing around, I am not experienced with sharding :v
[15:12:16] <StephenLynx> since we using emoticons and such :3
[15:21:31] <m3t4lukas> hey guys
[15:21:50] <m3t4lukas> in the C driver the validation of my bson succeeds
[15:22:05] <m3t4lukas> well, all except BSON_VALIDATE_DOLLAR_KEYS
[15:22:16] <m3t4lukas> but since it's a filter that is okay
[15:22:42] <m3t4lukas> now if I do bson_as_json it returns a null string :/
[15:23:10] <m3t4lukas> ah, no it doesn't
[15:23:17] <m3t4lukas> sorry to have bothered you
[15:24:25] <deathanchor> m3t4lukas: one those weeks, huh?
[15:25:06] <m3t4lukas> it's the time of the day
[15:25:20] <m3t4lukas> 11 hours of nonstop coding take their toll :P
[15:26:25] <deathanchor> I stop trusting myself after the 5th hour, hence I do some testing at the end of the day, and then check my tests again the next morning
[15:32:31] <StephenLynx> I just have a very feline approach.
[15:32:47] <StephenLynx> "I just want to browse imgur and youtube now" :v
[15:33:08] <StephenLynx> other times I will be working on a sunday morning
[15:35:59] <m3t4lukas> deathanchor: I'm testing, too
[15:36:11] <m3t4lukas> needed the json for seeing wht's wrong
[15:36:29] <deathanchor> fav is when testing fails EOD, but suddenly works next morning.
[15:36:59] <m3t4lukas> yeah, that's the best beginning of a day
[15:37:13] <m3t4lukas> found the error, everything works like a charm now
[15:37:38] <m3t4lukas> errors in recursive functions are the worst
[15:37:58] <m3t4lukas> especially when they have multiple parameters...
[15:38:07] <m3t4lukas> *arguments
[15:38:52] <StephenLynx> nothing beats those errors related to memory that happen in random ways.
[15:39:25] <m3t4lukas> yeah, right
[15:41:06] <m3t4lukas> and the bigger it gets the more they apear
[15:56:34] <fxmulder> after sharding is enabled and chunks are migrated, do you have to do something to remove the old migrated data on the original shard?
[16:00:13] <GothAlice> deathanchor: Speaking of testing… had production fail after a deployment push because of one unpinned package changing one line to "fix" the "feature" we were abusing. ^_^
[16:00:45] <GothAlice> deathanchor: The symptom was "can't look up 'modified' field of object None". Super, duper helpful.
[16:02:34] <GothAlice> fxmulder: AFIK MongoDB should automatically clean those up once it's confirmed migration off the initial host.
[16:07:02] <fxmulder> GothAlice: any suggestions if it doesn't? :)
[16:09:41] <GothAlice> fxmulder: Ref: http://stackoverflow.com/questions/15430127/how-to-remove-chunks-from-mongodb-shard and http://docs.mongodb.org/manual/tutorial/remove-shards-from-cluster/
[16:09:54] <GothAlice> There might not actually be data in the shards you are seeing and wanting to move. ;)
[16:14:43] <fxmulder> I'm thinking that the count() in the first replica set is wrong
[16:15:28] <fxmulder> its almost double that of the new replica set which makes me think it includes the old data
[16:16:30] <fxmulder> if it does indeed include the old data I suppose I could script something up to see if it finds duplicates between the two replica sets
[16:35:01] <fxmulder> yeah, I'm finding duplicates between the replica sets
[16:51:56] <fxmulder> so if I shard based on message_identifier and I have a specific message_identifier value, whats the best way to determine what shard it should belong to?
[17:18:25] <GothAlice> Huzzah, the biggest outstanding WiredTiger ticket impacting my dataset has been resolved.
[17:18:37] <GothAlice> No more OOM-killer for me!
[17:19:46] <GothAlice> … now to wait for CursorManager to get fixed.
[17:27:25] <StephenLynx> noice
[17:27:39] <StephenLynx> any expected release for when it will be the default engine?
[17:28:11] <fxmulder> whats wrong with this query? db.chunks.find({min: { $lte: '0001e07f9c55d06f3b7c989dcbd58e6e.01e87d8cee3ac229c4c64a1fd35fb667cd11a400.1399902906'}}) I'm trying to match against http://nsab.us/public/mongodb
[17:28:33] <fxmulder> hah nm I'm missing a layer
[18:27:13] <acidjazz> whats hte proper query for when my document has an aray of text fields and i want to see if my value is in one of them
[18:27:19] <acidjazz> $in ?
[18:27:25] <StephenLynx> yes
[18:27:35] <StephenLynx> field : {$in:array}
[18:28:18] <acidjazz> i thought $in was hte other way around
[18:28:32] <acidjazz> ok so.. the field is the array..
[18:28:43] <acidjazz> im not explaining correctly
[18:28:53] <acidjazz> i have a document with categories: [1, 2, 3, 4, 5]
[18:28:57] <StephenLynx> ok.
[18:29:00] <acidjazz> how doi check if 3 is $in..
[18:31:08] <acidjazz> like maybe a $contains
[18:31:11] <jacksnipe> $elemMatch
[18:31:28] <acidjazz> interesting
[18:31:42] <jacksnipe> that what you're looking for?
[18:31:44] <StephenLynx> let me check
[18:32:11] <acidjazz> $elemMatch: { $is: 3 } ?
[18:33:46] <StephenLynx> hm
[18:33:53] <StephenLynx> try to just use field : value
[18:34:04] <acidjazz> when fields in an array?
[18:34:09] <acidjazz> field*
[18:34:41] <GothAlice> {myarray: 'somevalue'} will compare somevalue against each array element, and if one matches the document matches.
[18:34:42] <acidjazz> nothin
[18:35:52] <acidjazz> hmm no bueno
[18:36:49] <GothAlice> acidjazz: http://showterm.io/394316f3ae9fbafca86dc < then the structure you actually have is not the structure you think you have
[18:37:19] <acidjazz> actually i have a seperate issue i need to address 2min
[18:43:46] <acidjazz> thanks GothAlice that worked, ok more importantly
[18:45:53] <acidjazz> if i stack that with an $and and do this again will it only filter categories that have BOTH?
[18:45:54] <acidjazz> lets find out
[18:46:56] <acidjazz> awesome
[18:47:14] <acidjazz> so this newer API has a debug mode that exposes all my mongo things which has been a great help
[18:47:27] <StephenLynx> what api?
[18:48:54] <acidjazz> sort of liek this https://gist.github.com/acidjazz/048bd15d989e61d604b0
[18:49:28] <acidjazz> sort of a combinatino of API layer -> Mongo Listing layer -> Mongo Model Management
[18:49:33] <acidjazz> combination*
[18:49:49] <acidjazz> the listing layer just provides general mongo listing functionality
[18:49:59] <acidjazz> like i have this dollection, i want these fields sortable, and these fields filterable
[18:50:20] <acidjazz> so in that gist i have lots of data for my front end
[18:50:34] <acidjazz> what i can filter, whats filtered, what page im on, how many pages, total amount, etc.
[18:52:01] <acidjazz> eventually your actual class to interact with the document kinda looks like this https://gist.github.com/anonymous/0e4b6224426e2e6e9f00
[19:24:24] <greyTEO> cheeser, how do you retrieve the _id value from the Document class?
[19:24:25] <greyTEO> http://api.mongodb.org/java/3.0/?org/bson/Document.html
[19:28:02] <morenoh149> greyTEO: never using the java driver. usually the resultset includes the _id field
[19:28:08] <morenoh149> used*
[19:28:40] <greyTEO> morenoh149, I think i found my problem. wasnt the driver.
[19:29:15] <cheeser> greyTEO: all set?
[19:30:45] <greyTEO> I figured it out. My bad. Thanks
[19:31:29] <cheeser> no worries
[21:55:52] <fxmulder> so I am looking to upgrade my cluster from 2.4 to 2.6
[21:56:39] <fxmulder> I currently have mongodb-10gen installed using the downloads-distro.mongodb.org ubuntu repo
[22:37:09] <acidjazz> fxmulder: back it up then just go to town
[22:40:47] <fxmulder> there's no backing this puppy up :\
[22:41:00] <fxmulder> seemed to go ok though
[23:14:53] <eba> hi all