[06:09:39] <kennethd> I am trying to track down two pymongo OperationFailure errors being generated by cron scripts: "cursor id ... not valid at server" (pymongo 2.4.2, python 2.7.3, mongodb-linux-x86_64-2.2.3) + "getMore: cursorid not found" in mongodb.log, but all references I can find online point to a timeout issue after 10 mins & a) i see this error < minute into the program (even running script from command line) & b) find(timeout=False) within script d
[06:26:59] <crudson> kennethd: I use ruby rather than python, but the timeout will only work in ruby if invoked with a block rather than returning a cursor. Sorry I don't know the analog to that in python, but perhaps it could be something similar.
[06:38:48] <jsheely> Anyone around that may be able to answer a few questions? Specifically on running files
[08:33:10] <kennethd> crudson: hmm, don't know what that means, but i will sleep on it... thanks for the reply though!
[08:34:05] <crudson> kennethd: I looked a little, and it seems like that won't apply...perhaps the cursor is being closed elsewhere or falling out of scope.
[08:36:00] <kennethd> crudson: np, thanks for the thoughts
[09:32:37] <aandy> hi guys, i have a master-slave-slave setup, and wondering if i can config it to permently allow queries on secondary members? as in, on a db level, not cursor/lang
[09:34:25] <Nodex> the querying comes from the DSL
[09:37:43] <aandy> sorry, i'm not sure i follow. dsl in mongo?
[09:38:48] <aandy> okay, so i should always make connection instances slaveOk, it can't be done at a config level?
[09:44:28] <aandy> it'll make for an interesting loadbalancing exercise. would be trivial if it just had to select one good, but it has to be the PRIMARY, hehe. i'll put my thinking cap on. thanks, Nodex
[09:57:42] <derelm> hi, can i use replication to migrate a mongodb instance from one server to the other with almost no downtime? if so, how would i do that?
[10:03:15] <marcqualie> derelm: you would add the new server as a secondary then wait for it to catch up. Once it's caught up you would issue the stepdown command to the old server and this will make the new server primary. Once it's primary it will be safe to remove the old server
[10:03:31] <marcqualie> there will be about 10-20 seconds of downtime while the stepdown takes place but most drivers will handle this gracefully and retry
[10:03:50] <derelm> will i have to prepare config on my former server somehow to make it work?
[10:04:27] <marcqualie> no there shouldn't be any config, unless you have authentication. If you haven't already you will want to turn it into a replica set using rs.initiate()
[10:05:02] <marcqualie> that should help you out with the precedure if it isn't already enabled for a replica set
[10:17:39] <Siyfion> say I have a collection containing documents in the format: { name: "foo", items: [ { value: 1.99 }, { value: 2.99 }, { value: 1.99 } ] } and I want to remove *all* the items-objects that have a value of "1.99" across all the documents in the collection, is there a way I can do this?
[10:19:51] <Siyfion> I kinda think that I need to use the update() syntax.. but I'm not 100% sure how to get it to remove the object from the array...
[12:34:34] <unxmaal> what's the correct role for an admin-level user to be able to issue "rs.conf()" in an authenticated mongod instance?
[13:48:59] <aandy> hi. i'm getting: Assertion: 13111:wrong type for field (uid) 1 != 16, but how do i *force* a int32 assignment rather than double? i've tried: { $set: { uid: 1 } }, { $set: { uid: parseInt(1) } }, but they return double aswel o_O
[13:49:35] <aandy> the update is ok, as verified by setting it to, e.g. String, was no problem
[14:37:21] <aandy> is there a specific reason why this: https://jira.mongodb.org/browse/SERVER-1594 isn't supported (yet), or is it a simple case of "haven't gotten around to it"? is it an uncommon scenario in mongo (as in, am i doing it wrong ;)) my case is: 3 boxes, 3 mongod (replica, no sharding), idea being: each box needs access to the same data. to provide failover in case either: 1. local db goes down, 2. primary goes down (3. remote slave/box goes down). election, fa
[14:38:02] <aandy> so what i do now is update the a loadbalancer whenever the primary changes (which is hackish)
[14:42:36] <remonvv> aandy, you can still do it, you just need to create a single shard.
[14:42:42] <remonvv> There's very little practical difference.
[14:43:50] <starfly> aandy: agree it would be good to have that feature, though
[14:44:04] <aandy> remonvv: great, i'll look into that, thanks
[14:44:26] <aandy> starfly: right, but not much activity on it yet, but at least it's planned and assigned :)
[14:45:46] <aandy> better than "unwanted, closed" :p
[14:46:01] <remonvv> Only marginally so in my experience :p
[14:47:08] <Nodex> I am very surprised mongos didn't already do this
[14:47:31] <starfly> Nodex: agree, seems like a no-brainer
[14:47:52] <aandy> supposedly the logic needs to be ported (off of a comment in the jira history)
[15:21:23] <redsand> any ideas on debugging the reason why this value is returned: MONGO_BSON_NOT_FINISHED
[15:21:31] <redsand> bson_finish is definitely being called
[15:21:39] <redsand> is there some sort of character i should be escaping?
[16:01:14] <serafie> Hello! Will MongoDB run on PowerPC under LTIB in an embedded environment? Is it flexible enough to deal efficiently with very little resources on a very tiny dataset?
[16:01:42] <serafie> I'm looking to replace a very slow implementation of a k-v datastore which uses sqlite in the backend.
[16:03:59] <kali> serafie: well, it's definitely not what mongodb is optimised for
[16:04:28] <kali> serafie: mongodb likes big servers with buckets of RAM, and the feature set is much wider than k-v
[16:05:40] <kali> irk ! LTIB site uses comics sans serif
[16:06:44] <serafie> kali: I must not have comic sans installed. :D
[16:07:25] <kali> serafie: more seriously, first thing mongodb does when starting is allocate a few hundred MB on the disk, and mmap them. even with an empty dataset
[16:07:34] <kali> serafie: so.. embedding ? i'm not too sure :)
[16:08:15] <serafie> kali: yeaah ok. So know of any others that are extremely lightweight?
[16:12:00] <kali> well, i can google for you, but... sorry, emebedded is not really my field
[16:12:23] <serafie> no prob, I know it's OT. I'm searching. Thanks for your help!
[16:49:01] <jblack> sarafie: perhaps sqlite is a better fit for embedded?
[19:45:46] <astropriate> is it possible to pass values to the reduce function of map-reduce? i want to only get documents that meet a certain criteria. I am also referencing to to other documents using the _id field. is there some way to populate/join
[19:45:59] <astropriate> if there is a better way please advise
[20:39:57] <ptwobrussell> as a matter of curiosity, could someone point me to any docs that talk about the kinds of indexes/data structures that mongodb uses under the hood? I found this ticket https://jira.mongodb.org/browse/SERVER-380 but it's not obvious what data structure ends up getting plugged in from reading the comments? I know that b-trees are used for most storage, but what about the full text index? is it clucene? And what about the geo-indexes? Are they based o
[21:28:21] <leifw> ptwobrussell: as far as I can tell, everything is b-trees
[21:28:44] <leifw> ptwobrussell: the geo indexes are just done by massaging queries into something a b-tree can deal with
[21:30:34] <ptwobrussell> leifw - thanks, that's helpful. are you saying that you think even the full text index is b-tree based as well?
[21:31:16] <leifw> ptwobrussell: that is true, the full text index is built by splitting the text into tokens, removing stop words, and stemming, and then dumping the results (as big arrays of tokens) into a b-tree
[21:32:08] <leifw> so inserting {'text': "the quick brown fox jumped"} is a bit like inserting {'text': ['quick', 'brown', 'fox', 'jump']} into a normal index on {'text':1}
[21:32:34] <ptwobrussell> leifw - thanks, that's very helpful (and interesting)
[21:33:02] <leifw> the stemming might go the other way, I don't know, you might end up with ['quick', 'quickly', 'brown', 'browned', 'browning', 'fox', 'foxes', 'jump', 'jumped', 'jumping', 'jumps'] instead
[21:33:50] <ptwobrussell> leifw - probably the former would make the most sense and the query is stemmed to match what would be stored
[21:40:23] <heewa> I'm trying to decide between raid 0 and raid 10 across EBS volumes on amazon. Mongo's website on production notes says this on the topic: "RAID-0 provides good write performance but provides limited availability, and reduced performance on read operations, particularly using Amazon’s EBS volumes: as a result, avoid RAID-0 with MongoDB deployments."
[21:40:40] <heewa> I'm trying to understand why raid 10 would have better read performance than raid 0. Any idea?
[21:41:49] <SproutDB> hey everyone, I am doing some research on database-as-a-service, would you please take my survey, giving away a $50 amazon gift card surveymonkey.com/s/C57JP8W
[21:42:01] <heewa> Are they saying that raid 10 across 4 volumes has better read performance than raid 0 across --2-- volumes (basically assuming the mirror isn't there)? Or that it has better read performance than even raid 0 across 4 volumes?
[21:42:53] <leifw> if you have a good controller I imagine it would be better than RAID 0 across 4 volumes
[21:43:17] <leifw> with straight RAID 0 each request can be served by exactly one disk, so if you get unlucky you can get all your threads hitting the same disk
[21:44:26] <leifw> with RAID 10 each request can be served by two disks, so let's say all the even stripes are on the first two disks, now you can have two requests for even strips (spread out from each other) and each can be served by a separate disk head
[21:44:45] <leifw> RAID 1 has the best read performance, because every disk can serve every requst, but that slows down writes
[21:44:54] <leifw> it's kind of like sharding (RAID 0) vs. replication (RAID 1)
[22:54:21] <dougb> if I empty a collection and new documents are created, is there a possibility that the document could get the same ID as a previously created document? I saw that part of the ObjectID is based off of the unix epoch so I would think it's always unique
[23:03:19] <crudson> dougb: it's very unlikely, on the same machine, if the clock hasn't changed