[00:05:23] <TommyTheKid> OK, so I *know* I am being dense or missing something obvious. I am creating a new "user" in an existing mongo 3.0.x cluster, I can get the user to authenticate if I specify "admin" then change dbs, but I can't connect directly to its "application" db. Another user on the same system works properly :-/ (there is no system.users in the working application database)
[00:06:24] <TommyTheKid> the user has role "dbOwner" and db: "applicationDB2"
[00:11:19] <TommyTheKid> I am authenticating with a user with role "root" to create the user (if that matters)
[00:23:28] <TommyTheKid> ugh, apparently you create the users on the database, but you can't see the collection "system.users" in it... however "show users" after "use appdb" does show appdb.appdbuser ... so ... wow suckify
[10:22:17] <Mmike> Hi! Is there a way to change the log level verbosity on a RUNNING mongod instance? I am running mongo 2.4.9
[10:31:05] <thapakazi> Please recommend me best storage engine for my production: (app demanding optimised for fast disk I/O), I was looking into perconaft, but they are ditching it on future release :(
[10:59:51] <thapakazi> Please recommend me best storage engine for my production: (app demanding optimised for fast disk I/O), I was looking into perconaft, but they are ditching it on future release :(
[12:14:56] <HoierM> Is there anything for mongo that resembles the hibernate xml configuration? I'm using Java, but i can't annotate the model. Not possible to change the model, in no way.
[12:24:36] <StephenLynx> thats because there is no schema validation.
[12:25:11] <StephenLynx> one document can be {banana:9001} while the other can be {zebra:{omg:'kek'}}
[12:27:52] <kurushiyama> StephenLynx Seriously, that one is good. It takes away boilerplate, but lets you go down to the driver in case you want to.
[12:28:02] <StephenLynx> to be honest, I see zero reason to use any kind of schema validation on a database that doesn't implement relations.
[12:28:18] <kurushiyama> StephenLynx hibernate is not only validation.
[12:28:21] <StephenLynx> at best is a crutch for developers that shouldn't be allowed to program to begin with.
[12:29:25] <StephenLynx> sure is not just validation, after all, how could they justify it without loads and loads of useless bloat.
[12:29:30] <kurushiyama> StephenLynx Well, I use it. I validate the user input multiple times. Frontend before submit, server on submit, and I use document validation to make sure the data stays as it should be, no matter what.
[12:29:56] <StephenLynx> the problem is adding a whole dependency for something that is not even a dozen LOC.
[12:30:13] <kurushiyama> StephenLynx But using SpringData just for the sake of it will cause serious problems ;)
[12:31:08] <HoierM> I'm more worried about the serialization/deserialization part, i'm not doing the web module, just the persistence layer... I wanted to use SpringData, just not sure if it's too big a dependency for this project.
[12:35:28] <HoierM> I'm going at it from what i saw on the Morphia documentation, though.
[12:35:43] <kurushiyama> If it is a small project, I suggest using Morphia directly. If you have to, you can pass around the client object or (if the project has the potential of getting bigger) use Guice.
[12:36:52] <HoierM> Yeah, exactly that. I'm quite new to mongo, so i might be saying bullshit on this side... The thing is that i cannot annotate the classes directly. Any direct model change would be seen as a hack, so i can't do that. The model is on a separated module.
[12:36:53] <kurushiyama> HoierM Although I would not underestimate SpringData. If you just need basic CRUD, this can be achieved with a few dozen lines of codes on top of _all_ of your entity classes.
[12:37:32] <kurushiyama> HoierM WHAT? Why can't you annotate the classes directly?
[12:38:05] <HoierM> I cannot change the model. That's the catch. Before i could control it, but they changed it to a module, so i cannot make changes to it.
[12:38:30] <kurushiyama> HoierM runtime instrumentation is a drag, to say the least.
[12:38:58] <HoierM> To explain better, this is for my university, and since there's a load of people doing different solutions, they decided to do this.
[12:39:13] <kurushiyama> HoierM Well... fork the code?
[12:39:57] <HoierM> kurushiyama well... that'd still be a model change, and my professor would hate it.
[12:40:24] <kurushiyama> In which parallel dimension is that a model change?
[12:40:59] <HoierM> Yeah, anything vendor-specific. It was kinda of absurd when i heard it the first time too, i cannot even picture this without annotation...
[12:41:32] <HoierM> But then i remembered that hibernate had those old xml external mappings, because i only used the annotation-based ones, so i was looking for something like it
[12:43:49] <kurushiyama> HoierM Hm, the models are beans?
[12:44:54] <HoierM> I pretty much wanted this: https://github.com/DavideD/ogm-mongodb-example/blob/master/src/main/resources/hibernate-contact.hbm.xml
[12:45:37] <kurushiyama> HoierM Would you answer my question? I might have a solution for you, if that is the case.
[12:45:39] <HoierM> They "are being converted into". They didn't even made get and set for all the fields, so i can't call it exactly a bean.
[12:46:37] <kurushiyama> HoierM Well, subclass them in a bean and override. Lombok might be helpful here.
[12:47:14] <kurushiyama> HoierM Or, to be more precise override and hide.
[12:47:54] <kurushiyama> HoierM Then use annotations on your bean and Bob's your uncle.
[12:50:33] <HoierM> kurushiyama Heh, now that's one nice expression. I'll look into that, then. Thanks for the help.
[12:54:32] <kurushiyama> HoierM You probably can use Lombok for the boilerplate. But with hiding(where necessary only!) and subclassing, your problems should be solved.
[14:58:04] <kurushiyama> scruz Everything fine, so far.
[14:58:27] <scruz> i’m using an $eq, so as long as it’s not a valid value, it’s allowed to be null or empty
[14:58:53] <scruz> i hate complicated agg pipelines
[14:59:07] <scruz> they’re like regexes - write once, read never
[16:03:36] <speedio> anyone know what i can use for wordpress that handles documentation for software with different versios(similar to msdn documentation)?
[22:10:24] <kurushiyama> Oh. That is a long query.This can happen when you set the timeout for the query to a big number or to 0 (worst case) and the client does not properly close the cursor, iirc.
[23:02:15] <Derick> UberDuper: really? Can you write it down and email me? I did write it after all.
[23:03:49] <UberDuper> Oh? My perspective is as the mongo server operator dealing with apps that end up hitting connection limits.
[23:04:24] <UberDuper> Or apps that don't properly close their connections.
[23:05:48] <UberDuper> The one thing I'll give it credit for is that you don't have cursor not found issues when load balancing mongos nodes.
[23:08:49] <kurushiyama> UberDuper Reaching the connection limit? Even on my 6 year old laptop with 4Gb of RAM, running several databases and my complete dev environment my mongod reports a max connection count of soome 7k...
[23:09:32] <UberDuper> In 2.4 and earlier, there was an arbitrary connection limit of 20k.
[23:10:08] <UberDuper> I've seen primaries hit that a lot.
[23:10:22] <UberDuper> It's much better in 2.6+ due to mongos pooling connections to replsets.
[23:10:34] <kurushiyama> UberDuper May well be, but from my perspective, running into your max connection count is a question of lazy resource management and lack of tests therof.
[23:10:58] <UberDuper> So even if you get to 40k connections into your mongos nodes, you could still only have a couple hundred connections to the primary.
[23:10:59] <kurushiyama> UberDuper And that is not a driver issue or an issue of MongoDB.
[23:23:44] <bjpenn> Specifies a cumulative time limit in milliseconds for processing the operation on the server (does not include idle time). If the operation is not completed by the server within the timeout period, a MongoExecutionTimeoutException will be thrown.
[23:23:51] <bjpenn> thats a copy and paste from the docs, whats the "idle time"
[23:29:46] <kurushiyama> bjpenn To be aken with a pound of salt and then some, here is how I read it: When a query is sent to the MongoDB server, it does not get executed right away. It is run through the query optimizer and – as you noted, and especially for MMAPv1 – the requested ressource or parts thereof might not be available. Say you have an unindexed query, aka collscan. Even with WT, documents might be locked while the query traverses the collection.
[23:29:46] <kurushiyama> I guess those are the idle times meant.
[23:33:29] <kurushiyama> Basically, it is a wild guess taking into account a few things. I am most likely totally off, thinking of it twice. The collection or documents therein being locked could very well count to the timeout (and actually should, from my perspective.)
[23:37:58] <UberDuper> bjpenn: Best place to start with finiding out what why that query is slow is to check the mongo logs.
[23:39:02] <kurushiyama> bjpenn Well, that is not exactly new. The docs state pretty much the same. And UberDuper is right, especially when you go for mlogviz.
[23:39:53] <UberDuper> It'll tell you if it's using an index and if so, which ones.
[23:41:17] <UberDuper> Assuming *any* of those queries have finished.
[23:42:08] <UberDuper> It'd be nice of currentOp() showed the query plan it's using.
[23:44:01] <bjpenn> UberDuper: what do i look for in the logs
[23:44:18] <bjpenn> i guess one way is to find the time when i did the currentOp() and then minus the seconds its been running to get a rough estimate when it started running
[23:46:55] <UberDuper> To sort the slow queries by time spent.
[23:47:16] <kurushiyama> bjpenn Not sure wether they still work, but Thomas Rückstiess mtools might be quite handy : https://github.com/rueckstiess/mtools/wiki/mlogfilter