PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 19th of March, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:26:02] <joshua> anyone familiar with what a " warning: Finding the split vector for database.collection..." type of message means in the logs
[08:33:34] <[AD]Turbo> ciao all
[09:02:02] <halfie> hi, I have an array in my data (each entry has this array), the array has bunch of dictionaries. How do I search based on a particular dictionary value?
[09:06:51] <ron> define 'dictionary'
[09:16:33] <Nodex> ron o/
[09:20:35] <ron> Nodex: o/
[09:20:38] <ron> how's it going, sir?
[09:29:56] <Nodex> not bad, you?
[09:31:28] <ron> not good, unfortunately. got one of those diseases that can take months to recover.
[09:53:22] <resting> mongo _id.getTimestamp shows a different time from my system…how do i change it?
[09:54:29] <kali> resting: what ? what do you mead ?
[09:54:31] <kali> mean ?
[09:57:00] <ron> kali: you want some mead?
[09:57:41] <kali> ron: i'd prefer something more solid right now, i'm hungry
[09:58:02] <ron> well, here's a revolutionary suggestion - eat.
[09:58:35] <kali> ron: good idea, i was trying to solve that with the aggregation framework
[09:58:55] <ron> kali: step away from the computer
[09:59:16] <kali> ron: like "stop breathing"
[09:59:27] <resting> kali: erm…basically the when i do getTimestamp() on the _id object in the shell, it shows a different time from my system
[09:59:28] <ron> almost. almost.
[09:59:38] <resting> kali: like 4hrs difference
[10:00:18] <Nodex> ron :(
[10:00:28] <resting> nothing much in the .conf file that relates to time
[10:00:57] <Nodex> did you create the _id in a driver?
[10:01:27] <resting> Nodex: erm…yes...
[10:01:29] <ron> Nodex: yeah. and of course I have a new project at work where I need to create a pilot in 2 months, during which I also need to hire and train 10+ employees.
[10:01:41] <kali> resting: isn't that just a timzeone problem ?
[10:01:46] <Nodex> ^^
[10:02:12] <resting> kali: erm..wrong…its created automatically….
[10:02:19] <Nodex> ron : a pilot for a plane?
[10:02:29] <resting> kali: any idea where that timezone error is?
[10:02:51] <ron> Nodex: no, sortof a demo of the application but one that you actually give the user to... use.
[10:02:55] <Nodex> resting : is the offset a few seconds or exact hours?
[10:03:05] <Nodex> ah ok
[10:03:11] <Nodex> what's the app?
[10:03:37] <Nodex> I spoke to one of your fellow country men yesterday
[10:03:41] <ron> can't say :-/
[10:04:13] <resting> Nodex: seems exact hours to me
[10:04:16] <Nodex> regarding mongodb & solt
[10:04:23] <Nodex> resting : then it's a timezone problem
[10:04:26] <Nodex> solt -> solr
[10:04:55] <Nodex> for example in PHP you can set the default timezone of anything that calls an epoch
[10:05:19] <Nodex> ergo if you're language and framework/driver allows this then it's probbly set in there somewhere
[10:06:35] <resting> Nodex: i think so too..but i've no idea where to change that
[10:07:04] <Nodex> which language are you using?
[10:07:24] <resting> Nodex: to write to it? C
[10:07:51] <resting> but ObjectId was inserted automatically
[10:07:53] <Nodex> does "getTimestamp()" tie in with "date" on the server?
[10:08:15] <resting> Nodex: nope..thats the difference i'm talking about
[10:10:08] <Nodex> http://stackoverflow.com/questions/1620188/how-can-i-set-the-time-zone-before-calling-strftime
[10:10:10] <Nodex> maybe that?
[10:10:28] <Nodex> I dont know much C sorry
[10:12:54] <resting> Nodex: hm…you mean the C drive is affecting the timestamp? weird though cause its only this system that has problem...
[10:15:02] <Nodex> can you do this.... var t=new Date(); var ta=t.getTime()*1000; db.foo.insert({timestamp:ta});
[10:15:22] <Nodex> sorry divide by 1000
[10:16:01] <resting> in mongo shell?
[10:16:12] <Nodex> yes
[10:17:43] <resting> ok..done..what do you want to see?
[10:18:50] <resting> oh..the newly insert _id timestamp is still wrong
[10:21:41] <Nodex> then get the document you inserted and do "getTimestamp()" on _id and compare the 2 results
[10:24:07] <resting> Nodex: the one you told me to insert? _id is wrong..but the 'timestamp' is correct
[10:30:40] <Nodex> that is strange
[10:36:37] <resting> hmm...
[10:39:30] <resting> ISODate() is wrong..but i've no idea where to change it
[10:39:58] <kali> resting: run this and show us the output, please: mongo --nodb --quiet --eval "new ObjectId().getTimestamp()"
[10:40:11] <kali> resting and then this: TZ= mongo --nodb --quiet --eval "new ObjectId().getTimestamp()"
[10:40:29] <kali> resting: and just to make sure: date
[10:41:09] <resting> first output: Tue Mar 19 2013 18:38:53 GMT+0800 (SGT)
[10:41:36] <resting> 2nd: Tue Mar 19 2013 10:39:25 GMT+0000 (UTC)
[10:41:48] <resting> last: Tue Mar 19 18:39:44 SGT 2013
[10:42:29] <resting> any clues?
[10:42:55] <kali> well... this is perfectly right
[10:43:01] <kali> SGT is UTC+8
[10:43:20] <resting> hm…should mongo be in SGT too?
[10:43:24] <resting> *shouldn't
[10:44:07] <kali> resting: mongo stores UTC. displaying the timestamp in the right timezone is up to you
[10:45:54] <resting> kali: hm..really..i see…hm..i thought it displays fine in other systems…let me see if i can do a quick check
[10:47:43] <resting> kali: hm..nope…some how this system is saving in UTC…i have a system that saves in JST fine
[10:48:58] <kali> resting: mongodb does not store the timezone, the driver translate the time object from the language in a simple utc numeric timestamp
[10:49:35] <kali> there is nothing out of spec in the behaviour you showed us, so i don't know how to help
[10:52:51] <resting> kali: hmm….i see…thanks...
[14:09:30] <Nodex> I must say this "Sauce labs" is pretty clever
[14:24:43] <Gargoyle> ping nodex
[14:31:17] <Nodex> ping Gargoyle
[14:31:20] <Nodex> pong *
[14:31:24] <Gargoyle> Yo.
[14:31:32] <Nodex> howdee
[14:31:37] <Gargoyle> Can I get a copy of that location info you have?
[14:31:44] <Nodex> yeh
[14:31:54] <Nodex> do you want just place names or postcodes too?
[14:32:32] <Gargoyle> I'll start with place names - I assume its a fair chunk smaller?
[14:33:09] <Nodex> 41k places
[14:33:14] <Nodex> (documents)
[14:33:49] <Nodex> what format would you like it in?
[14:34:27] <Gargoyle> Don't mind. A mongodump tar balled up is fine. But whatever is easiest for you?
[14:34:37] <Nodex> mongodump is easiest
[14:34:40] <Gargoyle> :)
[14:35:55] <Nodex> check pm
[14:40:31] <modcure> hhmmm
[14:40:34] <modcure> oops
[14:41:01] <Nodex> spoo
[15:30:30] <kalink> 2.4 is out... congrats 10gen people
[15:31:52] <Nodex> rc3?
[15:36:03] <kalink> Nodex: http://blog.mongodb.org/post/45754637343/mongodb-2-4-released
[15:36:11] <Nodex> @/268831bd25904638699ef714660bf4877592042a/?key=1643575yigkuh123h2
[15:36:18] <Nodex> oops
[15:36:44] <Nodex> faster counts
[15:36:47] <Nodex> \o/
[15:36:56] <kalink> "kalink" ?
[15:36:58] <kalink> damn
[15:37:00] <kalink> my secret identity
[15:38:42] <Nodex> kudos on the fine grained access model
[15:42:16] <kali> Nodex: are you sure the optimized count have made the cut ?
[15:42:27] <Nodex> it says in the release notes it has
[15:42:45] <bjori> :D
[15:42:46] <Nodex> "Faster Counts: In many cases, counts in MongoDB 2.4 are an order of magnitude faster than previous versions. We made numerous optimizations to the query execution engine in order to improve common access patterns. One example is in a single b-tree bucket: if the first and last entry in the bucket match a count range, we know the middle keys do as well, thus we do not have to check them
[15:42:46] <Nodex> individually."
[15:44:08] <kali> Nodex: i guess i'm not looking at the same release notes :)
[15:44:08] <Nodex> we'll have to giess what "Order of magnitude" means though :)
[15:44:29] <Nodex> the ones I am looking at are from the link you posted
[15:44:37] <ron> <some marketing jargon here>
[15:44:48] <Nodex> it's just under the "Geo" part
[15:44:55] <kali> Nodex: ha ! ok
[15:45:05] <Nodex> :D
[15:45:13] <kali> Nodex: it's not listed there: http://docs.mongodb.org/manual/release-notes/2.4/
[15:46:08] <kali> i'll have to check how to port my ugly patch again :/
[15:46:27] <Nodex> nope :(
[15:46:38] <Nodex> see if you can get some clarification if it made the cut
[16:32:30] <dreeerererere34> hi, how can i save array into mongo database?
[16:33:03] <dreeerererere34> which schema type i need to define in model?
[16:33:54] <nDuff> dreeerererere34: MongoDB is schemaless. If you want to store an array, just push a document with a JSON list.
[16:34:43] <nDuff> dreeerererere34: If your question is about some particular set of database bindings, we couldn't answer it without knowing the library you're trying to use.
[16:35:50] <dreeerererere34> nDuff i'm working with node.js and mongoose and i need to define type of data which i will use. i already tried to use schema.types.mixed and schema.json and both are working, but the problem is on output because it outputs numbers without arrays
[16:36:57] <nDuff> Ahh. Don't know Mongoose, so I'm not the person to help.
[16:37:19] <dreeerererere34> nDuff ok, thank you anyway
[16:44:37] <double_p> hi. tried an update from 2.0 to 2.2.3 by adding a new secondary rs. which works if you start with a full replication.. but if i try so w/ scp'ing the whole data_dir before, it fasserts. wasnt 2.2 meant to be container-compatible to 2.0?
[16:45:52] <bmcgee> hey guys, I'm trying to implement simple filtering with paging support on my collection. Basic idea is laid out here: https://gist.github.com/brianmcgee/5197686. Are there any standard patterns I should be aware of?
[16:51:17] <upayavira> Question: I've done rs.initiate(). I want to do the opposite, make it back into a single stand-alone node. Should I just restart mongo without replSet=rs1?
[17:04:05] <Mmike> Still no fix for debian installer?
[18:04:03] <lazyPower> WOOOO MONGODB PITTSBURGH was lastnight.
[18:18:56] <geoffeg> Someone needs to change that /topic :)
[18:47:38] <ehershey> doh
[18:54:48] <maginot> Hello fellas, I'm a little confused about the using the specific bson types in a json document for struct modeling. Is there a place where I can find an example of the types written in a json file?
[18:56:19] <maginot> is this right: { $timestamp : "2000-10-10 01:01:01", $date: "2001-01-01", $ObjectId: 12345... } ?
[19:05:51] <apetresc> Hey guys, I've got a strange problem; I've got a snapshot of an old Mongo server's data directory and I'm trying to attach a new mongo instance to it. I've set the dbpath properly and the lock file is appearing in the right place, but none of the dbs/collections that are supposed to be in there are showing up. When I do "show dbs' it only shows (local). Anyone know what's up?
[19:06:03] <apetresc> It's not a permissions issue, the mongo user is able to read/write to the data directory without a problm
[19:08:38] <lazyPower> Whats in your oplog? may have some pointer as to whats going on thats preventing the database instance from seeing the data
[19:09:33] <apetresc> lazyPower: is oplog just the regular log file? Here's the contents: https://gist.github.com/5199150
[19:09:36] <apetresc> Nothing unusual-looking
[19:10:18] <apetresc> I just added a comment to that gist with the contents of the data directory
[19:15:38] <apetresc> Anyone?
[19:19:40] <ehershey> apetresc: maybe something with different command line args
[19:20:08] <ehershey> --directoryperdb
[19:20:13] <ehershey> it looks like that was on in your old setup
[19:20:16] <ehershey> but is not on in your current setup
[19:20:36] <ehershey> because the actual data files aren't in your directory directly but look like they must be in subdirectories
[19:20:46] <ehershey> which is basically what that parm specifies
[19:21:40] <apetresc> I think you're a genius ehershey :)
[19:22:04] <apetresc> That was it. Thanks!
[19:39:04] <Mkop1> if I have a collection with documents like {name:'Whatever',owner:['John','Mary','Sue']}, how can I get all documents owned by John?
[19:39:57] <AAA_awright> find({owner:'John'}) should match
[19:40:38] <AAA_awright> And you can match any item an in Array to any item in an Array with... I forget, $in or $any or something like that
[19:41:09] <Mkop1> oh cool
[19:41:37] <Mkop1> can I arbitrary sometimes have owner: 'John' and sometimes owner: ['John','Mary'], and find both with the same query?
[19:44:59] <AAA_awright> Mkop1: I work with that condition but I forget exactly how I handle it...
[19:45:34] <AAA_awright> Mkop1: Yeah, just use $in
[19:45:48] <AAA_awright> find({owner:{$in:'John'}}) but try it yourself
[19:45:59] <AAA_awright> And then that can take an Array too
[19:46:54] <AAA_awright> I'm not sure if there's indexing for this case, I doubt it, so the order in which they are specified may make a difference
[19:47:41] <AAA_awright> If you know Mary owns fewer documents than John you'd want to filter for that first, then 'John'... anyone know how this works exactly?
[19:48:04] <AAA_awright> Wait, that's for searching for all, not any in
[19:48:13] <AAA_awright> Still, I'm curious
[19:48:54] <Mkop1> oh. lack of indexing is a problem....
[19:57:03] <meekohi> Hey I'm trying to understand why a simple update doesn't work: db.twists.update({"created_at": null},{$set: {"created_at": +new Date()}}). What's the usual way of 'debugging' things with mongodb shell?
[19:57:42] <AAA_awright> Mkop1: That's just making sure you can do queries on single items in the array, it doesn't let you efficently do queries like "find documents where owner CONTAINS 'Mary' AND 'Sue'"
[19:58:32] <AAA_awright> Mkop1: The best you can do is search first for the Owner that returns the smallest set, then go through in O(n) time on the remaining owners listed
[19:58:36] <Mkop1> oh. for this particular purpose I don't need an index on BOTH owners
[19:58:41] <Mkop1> but good to know for the future
[19:58:45] <AAA_awright> Right, that works for you
[19:58:54] <AAA_awright> But I'm curious as to if MongoDB supports my case too
[19:58:59] <Mkop1> what I do need (unless I change my application)
[19:59:04] <AAA_awright> I suppose not, even though relational databases do
[19:59:15] <meekohi> herp derp needed "multi=true"
[19:59:37] <Mkop1> is the ability to search objects within the array
[20:00:04] <Mkop1> owner: [ {type:'dashboard',id:'Whatever'}, ... ]
[20:14:22] <ehershey> apetresc: awesome!
[20:14:25] <ehershey> you are very welcome
[20:16:47] <ehershey> meekohi: is your update just only doing one at a time?
[20:16:52] <ehershey> it looks like you might want a multi flag
[20:17:08] <ehershey> http://docs.mongodb.org/manual/applications/update/#update-multiple-documents
[20:30:20] <pala2> What does this sort part mean?? Users.find({score: {$gt: 100}}, {sort: {score: -1}});
[20:30:22] <pala2> -1 ?
[20:31:41] <pala2> ahh descending order ;)
[20:33:42] <jmpf> running sharded 2.2.3 - do I need all my mongos upgraded to 2.4 && use --upgrade 1st? or can I just start doing rolling upgrades?
[20:43:15] <roel__> Hello all, need some info to point me in the right direction: is it possible to use mongo as main DB and link another DB behind it that is near-real-time and receiving updates, kind of streaming? To store certain properties by collection and trigger some applications when required.
[21:18:02] <therealkasey> so someone tried to do a mongorestore on a nearly full disk. aborted it when they realized the error of their ways. deleted the raw db files from /var/lib/mongodb. still have the lock issue. note that the journal files are north of a gig, and we've only got 714M free on the disk. are these journal files likely full of changes from the restore waiting to be applied?
[21:27:49] <WarDekar> is there a way to have an index on a nested item?
[21:28:24] <tworkin> whats the best way to store a ~4mb string? im afraid this pushes the max bson object size
[21:33:03] <therealkasey> i believe the limit on modern builds is 16MB
[21:33:07] <therealkasey> tworkin
[21:35:36] <therealkasey> WarDekar: use the dot notation to refer to the nested field: ensureIndex({"document.deep.dark.value" : 1})
[23:44:53] <Brennan_> Hello, is anyone testing or using the new the text search?