[00:06:44] <rhqq> guys, i've been looking through documentation but i couldnt find the answer. what user roles are required to view the http interface?
[00:37:34] <george2> I need to run a radius of gyration function (http://paste.chakra-project.org/6314/) over my dataset. Should I be using map/reduce, or something else?
[00:38:25] <akarin> Hey guys, I had a question... I have a unique application and I feel mongodb would be the best choice for a starting point, but I have very specific needs regarding replication. Is it possible to somehow write a plug-in for mongodb where I could implement my own version of replication? If not, I suppose I could always write some sort of proxy server that sits between my application and mongodb and contact each server manually, but this is
[00:39:35] <george2> The builtin functions don't work for your purposes? http://docs.mongodb.org/manual/replication/
[00:42:10] <akarin> george2: I need to implement a special form of replication that basically allows for multiple primaries, and then they'll sieve results together upon rejoin if disconnected
[00:42:31] <george2> I have no idea what that means. :)
[00:44:42] <akarin> basically you can post updates to multiple servers, and if for some reason they're disconnected, it'll pick the latest update to be the final value for whatever item
[00:45:09] <akarin> most forms of replication only allow for one primary, and basically i'm doing something special
[01:08:45] <cheeser> akarin: no. no such extension is possible.
[01:09:02] <cheeser> short of patching the code and building it yourself, of course.
[04:00:32] <daniel-s> A question about database size: Why are databases so big? I mean, I have only been learning to use mongodb and experimenting with it a little. My DBs have only a few documents, but are several hundred MBs in size.
[04:00:48] <daniel-s> Will their sizes stay about the same until much more data is added?
[04:01:24] <daniel-s> Also, is there an option for something like, mongodb-lite? (like sqlite)
[04:01:42] <daniel-s> It seems mongodb is a little too heavy to embed in an application.
[04:03:17] <daniel-s> I have found this: https://github.com/Softmotions/ejdb
[04:51:50] <akarin> cheeser: thanks, patching the code it is, i guess
[05:31:58] <george2> I currently have thse functions http://paste.chakra-project.org/6322/ saved to my db.system.js. Can anyone help me figure out how I should run them over my dataset http://pastebin.kde.org/pc163fbcb/08004631/raw ? I want to collect all the posts matching userId "X" and put them through gyration() to get a radius of gyration measurement for each individual user.
[05:33:09] <george2> the "frequency" mentioned in the JS is just the number of data points for the user at location (lat, long)
[05:33:57] <george2> I'm unsure whether I need to do something with map/reduce (which I haven't used before), or if I can just use an aggregation pileline, or if I need to do something entirely different
[05:35:18] <george2> also, if it matters, I will be running this over a few hundred million data points, with probably a hew hundred thousand unique userIds
[07:26:12] <_rgn> is polling mongo for new objects a bad idea? to use it as a queue of sorts for background jobs
[09:43:59] <soko> Trying mongoose.connection.collections['collectionName'].drop( function(err) { }); returns TypeError: Cannot call method 'drop' of undefined. I assume I need to define a collection first? What's the recommended way to do so? (I'm following the code from a book and I have either missed something or it's an error in the book.)
[10:32:50] <bzikarsky> How does mongos balance data I insert into a sharded cluster when no sharding is configured for the db and collection? Does it all go to shard1 until shard1 is full?
[10:40:24] <bzikarsky> Hm. We have a scenario with many smaller databases. It's a steadily growing numer, each is hovering around 1-10GB. It would be nice to balance the databases to multiple shards, so writes hit different shards (replsets-primaries)
[10:41:09] <Derick> bzikarsky: you can do that, but you need to do it manually.
[10:41:25] <Derick> bzikarsky: you can set a primary shard for each database (I think, only before you create it though)
[10:41:52] <eutheria> hi, i am just starting to look at mongo, i was wondering does it support schema constraints?
[10:43:01] <bzikarsky> Currently we load-balance manually to different clusters. I'm afraid that introducing sharding with manual configuration would only introduce an unneccesary layer of complexity
[10:43:02] <Derick> eutheria: no, it does not. That's something that is now pushed in your appliction
[10:43:20] <Derick> bzikarsky: yes - I think your current solution is better
[11:06:31] <soko> Trying mongoose.connection.collections['collectionName'].drop( function(err) { }); returns TypeError: Cannot call method 'drop' of undefined. I assume I need to define a collection first? What's the recommended way to do so? (I'm following the code from a book and I have either missed something or it's an error in the book.)
[11:07:11] <soko> I've been stuck on this for a while and I can't see anything that I haven't followed. Any help is appreciated :-)
[11:19:01] <eutheria> i am trying to figure out if i should use mongodb, i am currently using orientdb, but struggling to integrate that with my java webapp
[11:20:59] <Nodex> eutheria : it's best to just ask the questions
[12:48:51] <idank> how do I tell a sharded cluster to rebalance after mongorestore on one of the mongod's?
[12:53:39] <cheeser> did you run mongorestore against the mongod or the mongos?
[13:27:55] <joannac> if you're sure you have all the data, then sure
[14:38:08] <pwaleczek> hey guys, anyone can tell me gow to limit mongod do only one instance? It's spawning multiple subprocesses and I'd like to stop that.
[14:58:19] <byalaga> Hi, one of our replicatset member runs the configdb server, is there way to check whether its a mongodb primary or not?
[15:20:38] <joannac> byalaga: connect to it and run rs.status()?
[15:31:13] <saml> is there python example of oplog.rs ?
[15:31:16] <ranman> joannac: it's so weird to have you in the Eastern timezone
[15:31:21] <saml> i want to monitor new operations
[15:31:39] <saml> examples i found on the web polls (with time.sleep())
[15:53:59] <byalaga> joannac: I have connected to mongo configserver shell, I want to know if there is way/command to check if the sever is also running mongd.. rs.status() doesn't work as i have already connected to configserver
[16:15:25] <saml> how can I enable replSet and make it primary?
[16:15:55] <saml> replSet=set0 master=true I have these in config file. but i get "not master" when i insert to the mongod
[16:17:44] <cheeser> connect to the primary and ask it to step down
[16:18:24] <saml> i only have single mongod. let me try
[16:48:39] <goreorto> I'm new to mongo and trying to understand how mapReduce works. I have a collection with about 3K records. When I perform a dump mapReduce, the records do not add up. db.events.mapReduce( function(){ emit('x', 1); }, function(k, vs){ return { x: vs.length }; }, { out: { inline: 1 } }). x ends up with a value of 6. Any hints are truly appreciated.
[17:07:40] <saml> rs.status() showed "set": "rs0" but mongod were started with replSet=set0
[17:54:32] <shadfc> hey, i've got a test suite for a python app that drops and recreates a db from fixtures for each test. That appears to be really slow. Any pointers on how to make this faster? I'm currently doing it all from pymongo via drop_database and then bulk insert calls
[17:57:42] <joannac> ranman: It's weird being here!
[19:22:24] <shadfc> so this is pretty cool. When running my test suite against a local mongod, I have sporadic errors when querying using secondary preferred read preference. After removing the read pref, all tests pass. I am not using a replica set locally -- { "ok" : 0, "errmsg" : "not running with --replSet" }
[19:31:21] <ranman> shadfc: you should use smallfiles and no prealloc as command line params or config options for mongod to minimize the amount of time creating the new database creates
[19:32:22] <shadfc> ranman: i'll add those and see how it does
[19:32:59] <ranman> shadfc: in pymongo you should refrain from using a MongoClient to connect a replicaset, use a MongoReplicaSetClient for that. If you're not running with replication the secondaryPreffered readpref won't really work for... well I mean you don't have any secondaries so :P
[19:33:12] <ranman> and those errors are it attempting to find a secondary
[19:33:26] <steve1> I just had a brief site outage that stemmed from the following events: 1) 5-node replicaSet, 2) took 2 nodes down (one was master). A new master was elected from remaining members, but site stayed offline 3) A new node was added to replicaSet, 4) The replicaSet continued to be un-query-able until the down'd nodes were taken out of replicaSet. Can anyone help explain what happened to cause the outtage?
[19:35:08] <ranman> steve1: what were the responses from the mongod that lead you to believe it was unqueryable?
[19:35:22] <ranman> steve1: also please feel free to open a community support ticket in JIRA https://jira.mongodb.org/browse/SUPPORT
[19:36:14] <steve1> ranman: our PHP application was hanging while trying to connect to MongoDB.
[19:36:43] <ranman> steve1: I need more info that that sorry, specifically what was it hanging on? what URI were you passing in? were you passing in a good seedlist?
[19:42:07] <steve1> ranman: right. I was hoping it was just our process failure that you or someone could say "yeah, duh … look at this page". I'm creating a MongoDB/JIRA account now as you suggested, and will go through the logs to see if perhaps an error message was overlooked.
[19:45:17] <joannac> I would be curious if it's a problem with the PHP driver, or whether we didn't actually get a new primary elected (i.e. a server bug)
[19:46:19] <ranman> I don't think it's either, it feels like a misconfiguration on the app end
[19:48:26] <starfly> steve1: if the future, you might consider manually stepping down the primary when you know you need to take it offline: http://docs.mongodb.org/manual/tutorial/force-member-to-be-primary/
[19:51:28] <joannac> yeah, and the last time you were watching a video
[19:51:45] <joannac> and the time before that we were chatting about not-work
[19:51:53] <joannac> and the time before that you were buying me lunch :)
[19:51:59] <starfly> steve1: sure, I'm all for testing fault tolerance, just not on a system or replica set where uptime matters
[19:52:44] <cheeser> so you're always walking by my desk ... and not working. that's what I'm hearing.
[19:53:42] <steve1> starfly: preaching to the choir. :) but by the same token, if fault-tolerance is not tolerant in production, then it's not really tolerant.
[19:54:03] <starfly> steve1: agreed, you "shouldn't" have had an issue
[19:56:53] <steve1> ranman may be right; it could be a mis-configuration on the app end. we've traditionally had a lot of pain with the fault-tolerance of MongoDB replicaSets. At the very least, the downtime may be enough motivation for the business to allow us spending time on finding those weak links.
[20:01:37] <starfly> steve1: yeah, you don't know what you've got until it's gone… Most innovation stems from catastrophes
[21:27:29] <NyB> cheeser: well, to be honest for my application getting some cases wrong might not even be noticed. Why would anyone want to store regexes in a BSON document ? :-p
[21:28:11] <cheeser> sending queries to the server for one
[21:29:40] <NyB> JSON isn't all that well defined in some cases either...
[22:19:09] <saml> cheeser, did you send to solr each mongodb document? or did you collect updated/inserted/deleted documents and sent to solr in batch ?
[22:19:32] <cheeser> each one individually. otherwise that watcher would have to cache
[22:19:51] <saml> yah. i wonder if solr can handle frequent updates
[22:52:01] <sflint> does anyone here use mongodb chef cookbook? to deploy config servers
[23:15:46] <TheDracle> couldn't add user: Only admin.system.users entries may contain 'otherDBRoles' fields
[23:15:59] <TheDracle> Anyone know why I can't add users with otherDBRoles fields set?
[23:19:14] <DevRosemberg> Hello Everyone, i need a bit of help with something
[23:19:29] <TheDracle> "otherDBRoles document Optional. Roles this user has on other databases."
[23:19:39] <DevRosemberg> http://pastie.org/8673538 in there, Achievements, Permissions and Purchased Items dont work
[23:20:00] <TheDracle> It seems to indicate it ought to be a valid field.
[23:21:12] <joannac> TheDracle: http://docs.mongodb.org/manual/tutorial/add-user-to-database/, last example "Only the admin database supports the otherDBRoles field."
[23:21:21] <joannac> I'll file a DOCS ticket for you
[23:24:56] <Joeskyyy> Not familiar enough with the java drivers sorry :\
[23:26:44] <DevRosemberg> Anyone in here familiar with them?
[23:52:39] <paulkon> as I understand it, the $ projection requires a field of the array in question to be present in the query document itself. Is it possible to project an array field if it is present without it being a part of the query itself?
[23:52:41] <paulkon> I want to return the array element if one of its subdocuments match a subdocument field but still return the document itself if it doesn't exist