[00:09:22] <_m> Then make it primary and add the empty secondary (which will be synced automagically)
[00:09:50] <_m> He says that's the easiest/most painless way. Obviously, YMMV. Sorry I couldn't provide more information than that.
[00:17:41] <aboudreault> _m, in mongodb, for my example use case, would you create one collection per user?
[00:17:52] <aboudreault> or a collection can be big enough
[00:20:47] <_m> aboudreault: A single collection with multiple user documents
[00:21:23] <aboudreault> this is a feature of mongodb? haven't see it yet. Currently reading the doc online
[00:21:50] <_m> Think of a collection as a "table" within a relational DB
[00:22:54] <aboudreault> yeah, that's how I see it. However, in mondb, I do not have pretty foreign key to link with the user.
[00:22:55] <_m> Each user could then have an array with document information stored. selectors on said array are pretty easy to understand/use and fairly performant.
[00:28:24] <_m> I've never had a chance to use gridFS in production
[00:28:56] <Vile> not in your server room (which might have no internet btw)
[00:29:01] <aboudreault> _m, I see ok... any string or value can implicitly be a foreign key if we want
[00:29:15] <_m> aboudreault: Need to head-down for a bit. Will try to answer more questions in a bit.
[00:30:00] <_m> Vile: In cases where I want to store user documents for their retrieval, having no internets is going to mean a lack of my service.
[00:30:37] <_m> Also, I don't have a DC unless you count our Rackspace Cloud as a DC (i wouldn't recommend their product, btw)
[00:30:41] <Vile> _m: there are big market for intranet solutions %)
[00:31:04] <aboudreault> Vile, you use GridFS in production?
[00:31:09] <Vile> aboudreault: don't forget to create index on those
[00:31:54] <Vile> for user-uploaded things. so far - no problems
[00:32:02] <aboudreault> Vile, yes, very important. I also test my query execution time when developing. This is the same thing for mongodb with explain.
[00:32:08] <_m> As I stated before, *my* use cases and experience tend to lean toward "this is easier to let s3 handle." I can see the usefulness of other techniques and would implement them if my stack leaned to that use-case
[00:32:42] <aboudreault> Vile, that's exactly what I need. user uploaded file. video + images. So GridFS was very nice. still need to read the doc though
[00:33:49] <aboudreault> _m, yeah, S3 is probably a very good solution too. never worked with it. You probably just put a file unique uuid in your mongo documents?
[00:43:00] <aboudreault> gtg, see you later. and thanks a lot for your help.
[00:45:04] <_m> aboudreault: You're welcome. Good luck with your project!
[01:43:22] <skiz__> I'm trying to set up a single shard on 1 machine with a router/config set up on another (for testing purposes) the config/router seems to be working fine, but when I attempt to add a shard ( which has shardsvr=true ) I get "errmsg" : "couldn't connect to new shard mongos connectionpool: connect failed
[01:43:52] <skiz__> there are no firewall issues, using admin db via the mongos, and I can connect to it remotely on the mongos shard port
[01:46:22] <Dr{Who}> we tried phpmoadmin and it ended up modifying a lot of our collections and we a fun day of fixing stuff. Does anyone know if RockMongo has this same problem?
[02:44:39] <ojon_> maybe some1 familiar with mongoskin odm for nodejs can answer my question:
[11:15:00] <kali> gigo1980: you need to get stop it, change port and discard replSet, run repair
[11:16:20] <kali> gigo1980: it might be more practical to just ditch the secondary data and let it do a full sync (this is how we deal with broken secondaries here)
[12:04:56] <gigo1980> kalli: thx that way works fine
[12:08:18] <typecast> there is some unexpected behavior in one step of my aggregation pipeline that I don't understand. I hope you can give me some pointers on this one
[12:08:42] <typecast> mongo is used with the pymongo driver and the expression in the pipeline is
[12:09:18] <typecast> so what I would expect from the documentation is that bucket is also an integer
[12:09:25] <typecast> at least, that's what I read from http://mongodb.onconfluence.com/pages/viewpage.action?pageId=38207860#AggregationFramework-ExpressionReference-ArithmeticOperators
[12:09:40] <typecast> is that assumption not correct?
[12:09:49] <typecast> (because what I get is a float)
[12:11:16] <jmar777> typecast: what makes you expect to get an integer? i don't see that specified in the documentation?
[12:11:38] <jmar777> "takes an array containing a pair of numbers and returns the value of the first number divided by the second number."
[12:11:39] <typecast> jmar: there's the table of expression
[12:12:04] <typecast> well, but that table is gone in the newest version of the documentation
[12:12:35] <jmar777> typecast: ahh, i see where you're referring to though
[12:15:13] <typecast> the problem is: they need to be integers
[12:15:47] <typecast> so, I'm now wondering whether this is normal behaviour, a bug in mongo or a bug in pymongo
[12:16:10] <typecast> but I have no idea how to proceed from here
[12:20:18] <Gargoyle> is passing safe = true as an option to update() using $set the same as a full document update? eg. makes sure that there are no errors at the expense of application speed?
[12:22:41] <NodeX> safe just means it will write to X nodes before returning
[12:23:06] <NodeX> I think the default is at least 1 node but you can configure that... if you're in a 1 node system it will sync it to disk
[12:23:33] <NodeX> (It posisbly syncs to disk in a multi node system on at least one node too I would imagine
[12:24:01] <Gargoyle> if two lines of code call update(blah blah, $set => etc) very quickly, is it possible that they would get run in different order on the server?
[13:10:22] <NodeX> Gargoyle : there is a lock but there is no garuntee which one would get saved / updated first - this depends on the latency
[13:11:12] <Gargoyle> NodeX: Do you know if useing safe would solve that?
[13:12:05] <NodeX> if you need transactions then mongo is probably not right for you
[13:17:21] <Gargoyle> It's not really a transaction. issue. Just more I need to think a bit more about my app logic.
[13:53:32] <gigo1980> is it posible that one process write data to an sharded cluster with mongo router a, and an other process will read that data from an different mongo router b. is it posible that there can be an data inconsistent
[15:08:41] <termite> I am looking for records in a list that also are within a certain radius of position x,y
[15:11:18] <remonvv> Does anyone know if a cursor can time out while iterating over it? Or does it just time out if getmore is not invoked for a long time?
[15:12:40] <Gargoyle> remonvv: Not seen one timeout, and have had some script that run for hours.
[15:39:17] <andywdc> This should probably be obvious
[15:39:47] <andywdc> but i have a collection called users, a collection called items, and i want to make a new collection which stores which items a user has - is that how we are meant to do it in mongodb?
[15:49:51] <andywdc> so why do people use mongodb:?
[15:49:55] <termite> andywdc: Mongo is fast because it is document based and not relational. If your data needs require allot of joins then Mongo isn't a good idea
[15:51:08] <termite> andywdc: mongo would be perfect for receipts. Since the information is not going to change
[15:51:08] <andywdc> sooo if i wanted to store all the items in my factory and never do anything els with the data - then mongodb suffices
[15:51:16] <andywdc> but waht complicated use cases does mongo db have!?
[15:52:34] <termite> andywdc: remember that each document has a maximum size so if you have the possibility of infinite orders you are going to slam into that limit
[15:53:50] <termite> andywdc: it's not supposed to be complicated. Using it to store item data for really fast retrieval is a great idea
[15:58:35] <noordung> Hi! I need some help choosing an appropriate schema design...
[15:59:01] <skiz__> I'm working from http://www.mongodb.org/display/DOCS/Sharding+Limits#ShardingLimits-Stepstoshardanexistingcollection (along with 20 other refs) however #7 never seems to happen by itself. is there an easy way to kick it off?
[15:59:46] <noordung> I need to be able to store large amounts of text in a document, and that text may change significantly between saves. What would be the best way to design the schema for that kind of documents? Should I resort to GridFS?
[16:00:25] <gigo1980> db.foo.copyTo("foo2") blocks hole mongocluster is that correct ?
[16:00:25] <noordung> Large amounts of text = as much as would fit in a document's size limit
[16:02:56] <gigo1980> @noordung : store it in gridfs. there is no limit
[16:03:04] <gigo1980> regular limit is 16mb each document
[16:03:42] <noordung> gigo1980, I'm slightly more concerned on relocations that MongoDB would have to make on saves, rather than the limit...
[16:04:52] <gigo1980> why dont you point in your you mongodocument to the gridfs documents ?
[16:05:57] <noordung> gigo1980, that is an option high on the list, but I was thinking on something more integrated... 16MB should be enough for my 'large' needs... at least initially...
[16:06:14] <noordung> gigo1980, I wouldn't like to do extra queries...
[16:07:28] <noordung> gigo1980, It's just that between writes, Mongo may need to deal with size jumps of megabytes... Say 1MB of text becomes 4MB... Those can be expensive, from what I know...
[16:11:43] <IAD> noordung: look at http://www.mongodb.org/display/DOCS/GridFS
[16:12:36] <noordung> IAD, Just a question... GridFS is pre-configured to avoid size jumps, correct? It uses the 256k chunks?
[16:16:16] <anthezium> hey i have a collection with lotsa documents (like 5mm) and i'm trying to export it to json, but mongoexport seems content to export 0 records when i run it: https://gist.github.com/3722945
[16:18:22] <anthezium> mongodump will only give me bson, right? how would i use skip and next in this situation?
[16:19:09] <wwilkins> anthezium: I think the export has a size limit, so get it to pump out enough records to get under that limit and loop through the whole collection.
[16:21:50] <anthezium> wwilkins: how do i bake those into a query? i can only find examples of skip using the js driver
[16:22:48] <IAD> noordung: so, it looks like not important. "mongod will only use the space it really use. There is no need to set " https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/hrRlhOwGWWk
[16:23:06] <NodeX> anthezium : mongodump also takes a -q parameter
[16:23:14] <wwilkins> anthezium: no clue I'm sorry to say, I'm just trying to throw out ideas.
[16:23:53] <anthezium> yeah skip and limit are both driver-level ideas, can't be expressed in query language. query language can only do like $orderby, $hint, $explain, etc.
[16:24:05] <NodeX> but you can't use skip on mongodump
[16:57:04] <skiz__> can someone give me a hand trying to kick off existing data on a shard to split to another. the chunks look good, but everything is still on the first shard. how can I get it to begin migrating?
[19:48:22] <mgriffin> why does mongo (on EPEL at least) depend on libpcap?
[19:55:54] <R-66Y> is there a way to update every element of an array in a document in one query?
[20:06:40] <jiffe98> I've setup a new instance of mongodb on a server, when I connect to it via --host of 127.0.0.1 or its IP it works fine but if I connect to it by hostname it times out
[20:06:51] <jiffe98> dns is working fine on that machine, I can resolve the hostname locally
[20:08:25] <skiz__> jiffe98: check the bind address in the config
[21:09:52] <g-hennux> is there a plausible reason why two of my three mongodb users can't authenticate any more from one day to the next?
[21:10:48] <g-hennux> the log says "auth: couldn't find user admin" – this worked fine just a couple of days ago
[21:13:48] <noordung> GridFS isn't actually something *native* (per-se) to MongoDB, it is just an API over the actual MongoDB documents and collections, correct?
[21:16:59] <g-hennux> ok, apparently it's only mongodump that's not working
[21:22:02] <g-hennux> ok, if it's an r/w user, that works; if it's r/o, it doesn't
[21:24:46] <noordung> kchodorow, so nothing is stopping me from implementing my own version of a GridFS-like system... :)
[21:31:25] <tomlikestorock> I'm trying to add a new member to my replset, and I can't successfully do it. I keep seeing this in the logs: ERROR: error processing ttl for db: mydbname 10065 invalid parameter: expected an object ()
[21:32:50] <tomlikestorock> also this: auth: couldn't find user myuser, mydbname.system.users
[21:39:25] <kchodorow> noordung: nothing at all :)
[21:40:54] <tomlikestorock> I set the config to use auth, use the key file, and set the replSet. Then I bring up mongo on the new box. Hop over to the primary, and run rs.add("newhostname:27017")
[21:41:54] <tomlikestorock> before I turn on auth, I add my admin user to the system
[21:42:37] <kchodorow> tomlikestorock: can you pastebin the errmsg from running rs.add and the log from the primary?
[21:43:22] <tomlikestorock> guess I just had to wait? It's syncing now?
[21:45:26] <doubletap> i cant seem to connect to a remote mongod instance using mongo
[21:45:50] <tomlikestorock> kchodorow: just to be clear, I don't need to add any other users to my new replica box when I want to add it to the set, right? I just add my admin user for my own purposes, then go to the primary and say to add?
[21:46:17] <doubletap> i use the form as described in the documentation but i get the errors that the options i am using (-u, -p, or —username, —password) are not valid.
[21:46:26] <doubletap> is there something i am missing here?
[21:46:46] <doubletap> i have the latest version of mongodb as of today.
[21:51:45] <doubletap> the error i get is "unrecognized option `--username'"
[21:53:27] <doubletap> it is odd because the docs have options that mongo does not show me when i just type "mongo"
[21:53:45] <doubletap> notably, username and password are missing.
[21:54:08] <doubletap> is there a reason my instance of mongo would be missing those options?
[21:56:34] <doubletap> anyone know why my instance of mongo has different options than what is in the docs?
[21:59:02] <jiffe98> anyone know why I could connect to a mongodb server via 127.0.0.1 and the external IP but not hostname rather than a dns problem?
[21:59:25] <jiffe98> I can resolve the hostname fine from the local machine but it times out when trying to connect
[22:25:51] <jiffe98> alright, I can connect if I pass '--norc --nodb'
[22:26:08] <jiffe98> but then show dbs gives me 'Fri Sep 14 16:25:46 ReferenceError: db is not defined src/mongo/shell/utils.js:1475'
[22:29:42] <jiffe98> it works with just --nodb also, but times out otherwise
[22:52:31] <kchodorow> tomlikestorock: yeah, it doesn't need any other users
[22:53:02] <kchodorow> jiffe98: did you pass --bind_ip as an option when you started mongod?
[23:43:55] <statim> is it possible to do a query using the properties of the document itself? for example, a document with cleared_at: 1234, last_message_at: 5678, and id want to run a query returning documents that have cleared_at < last_message_at