PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 22nd of September, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[05:48:58] <sz0> did anyone try to run node-mongodb-native latest version (depending on js-bson 0.5.5) on node v6.x?
[08:22:35] <spleen> Hello All,
[08:24:41] <spleen> echo 'db.dropDatabase()' | mongo uniques myip:27017
[08:24:46] <spleen> doenst work
[08:27:36] <spleen> any idea to remove database via command line ?
[10:32:19] <Guest24> Hey guys, I have a collection full of matches, and I need to set the player MMR variable in every single match to 0.. my records look like this https://gist.github.com/jamieshepherd/8eef4b1a840aa7fb079c33f83647ae92
[10:32:33] <Guest24> Is this even possible to do in a mongo update query?
[11:01:18] <havardge> mongodb-driver (3.3.0), spring-data-mongodb (1.9.3.RELEASE) and mongo db version 3.2.9 extremely slow after upgrading to macOS Sierra.
[11:01:43] <havardge> It is basically unusable. Everything was fine prior to upgrading the OS.
[11:02:05] <havardge> How to approach this?
[11:02:33] <havardge> Concretely, a collection of interactions with the database which previously took ~100 ms, now takes ~10 minutes.
[11:14:27] <cheeser> havardge: you should file an issue and we can look in to it.
[11:14:43] <cheeser> i know jetbrains is suggesting holding off upgrading while they resolve some issues.
[11:16:24] <havardge> @cheeser do I report this on jira.mongodb.org?
[11:17:09] <cheeser> yeah
[11:17:19] <cheeser> there's a "JAVA" project
[11:18:24] <havardge> Allright. Thanks :) I'll have a look to see if it's already reported, and if not add an issue.
[11:22:05] <havardge> @cheeser Is there any way I can attach some relevant data from my local mongodb logs or something?
[11:22:31] <havardge> If there is a command that outputs valuable information for what's happening
[14:32:50] <Kobbb> Hello
[14:33:12] <Kobbb> is there anyway I can use a $in operator in a $match within an aggregation ?
[14:33:32] <cheeser> sure. just use it.
[14:34:42] <Kobbb> but how cheeser ?
[14:37:07] <Kobbb> I get some "exception: bad query: BadValue unknown top level operator: $in"
[14:37:49] <cheeser> what's your pipeline look like?
[14:38:14] <Kobbb> I'm trying to export the json query
[14:38:26] <Kobbb> my query is build from PHP
[14:55:07] <sabrehagen> if i have an object structure of { parent : { children : [{ name, age }] } } and i have an index on 'parent.children' and 'parent.children.age', will these indexes make updates to the children array and child objects age property (e.g. $pull, $push, $inc) more efficient?
[15:12:04] <jamiel> Only if those fields are included in the query you are using to find and update them, else if anything it will make it slower as changes need to be updated in the indexes too.
[15:41:15] <dgaff> Ok, so I have a silly question. I am using ruby, and I didn't bother to check for what gem people were using in the last few years. Built something on MongoMapper. Shoulda looked, it's defunct. I'm looking at logs right now from db.currentOp() and it looks like I have global, database, and collection locks on all my updates of single documents...
[15:42:02] <dgaff> my question: is this potentially because my clients connecting to the DB are based on some super old stale library connecting to db? Somehow? IIRC docs say you shouldn't have locks like that at 3.2...
[16:08:25] <dustyfresh> Anyone know of a good way to search a document with regex if what I'm searching has an unknown parent key?
[16:19:53] <zylo4747> anyone use vagrant to provision mongodb servers? i'm trying to test something locally as a replica set and the problem i'm having is that all 3 VMs have the same mac address and ip address. what's the best way to get around this?
[16:23:02] <dustyfresh> zylo4747: I like to use Docker for that type of thing. This is the image that I use https://hub.docker.com/r/tutum/mongodb/
[16:24:27] <zylo4747> why use docker over vagrant? (i never used either before yesterday, my coworker just showed me vagrant to help me get a local environment going)
[16:24:41] <zylo4747> are they the same thing basically?
[16:25:36] <dustyfresh> Well for one you dont have to worry about setting up vagrant or really doing anything. Gets ya out of dependency hell.
[16:26:04] <zylo4747> okay that sounds better already
[16:26:12] <dustyfresh> clone the image, build for which mongo version you want to run, and voila you're ready to go
[16:26:38] <dustyfresh> yeah you don't have to worry about what distro's repo has what version of mongo
[16:27:09] <dustyfresh> That was an issue I had with Debian Jessie's default mongo version in their repos. I needed 3.2 :x
[16:27:27] <StephenLynx> what debian version is not supported.
[16:27:34] <StephenLynx> they only support up to 7
[16:27:40] <StephenLynx> I recommend not using debian at all.
[16:27:55] <StephenLynx> they focus on their RHEL repository.
[16:29:26] <dustyfresh> I like jessie because it's tiny and I can run most projects on only what I need v.s. having a lot of packages I'll never have to use
[16:35:34] <StephenLynx> its shit.
[16:35:49] <StephenLynx> plus if you want something tiny
[16:35:52] <StephenLynx> centOS minimal
[16:35:53] <StephenLynx> 600 mb
[19:39:31] <dgaff> Anyone have a good definition of what the difference between $set'ing and $inc'ing a field +1 would be in terms of performance?
[19:39:43] <dgaff> I'm not sure there'd be an impact, but I may as well check
[19:42:57] <cheeser> $inc is more friendly to concurrent updates
[19:43:25] <cheeser> $set will be "faster" because there's not read/inc/write cycle
[19:46:36] <Doyle> What are the performance issues mentioned in the doc where it suggests XFS?
[19:59:23] <scwizard> hey I'm trying to set up a total fresh database, but I'm getting some kind of permission error: http://pastebin.com/raw/TEth7Vy6
[20:02:21] <scwizard> this only happens if i have a key file specified in security:
[20:02:58] <scwizard> hmm maybe it's "Running a mongod with the keyFile parameter enforces both Internal Authentication and Role-Based Access Control."
[20:05:38] <dgaff> @cheeser thank youuuuu
[20:09:12] <GothAlice> Doyle: XFS, AFIK, uses compression schemes and COW (copy on write) semantics, which makes it a generally poor choice for memory-mapped database engines.
[20:09:43] <GothAlice> Doyle: I.e. it'll burn out an SSD's write lifespan right quick, beyond being less performant.
[20:11:28] <Doyle> tyvm
[20:11:28] <GothAlice> Doyle: Now, from what I recall, there are ways to configure trees in XFS with different storage properties, so it may be tuneable to avoid COW.
[20:17:58] <GothAlice> cheeser: Interestingly enough, the performance difference will be effectively zero. Both operations are handed the document being modified that has been loaded. $set first checks if the field already exists, $inc does, too. The code paths are fairly similar: both are a straight assignment in the "existing field" case when it comes time to apply the operation.
[20:19:29] <cheeser> GothAlice: yeah, that's why i said "faster" ;)
[20:20:37] <GothAlice> :P Not sure how it can even be air quotes faster… there should be no statistically significant difference, given how the operations are written.
[20:21:04] <GothAlice> (Though I find it very interesting that the actual increment happens during prepare, not apply.)
[20:21:35] <scwizard> I just can't log into my inital user: http://pastebin.com/raw/qYaJ5e8K
[20:21:51] <GothAlice> And TIL that the $inc operation literally is the same operation as $mul.
[20:22:12] <scwizard> it says it creates the user with root
[20:22:16] <scwizard> but i can't log in as it
[20:23:28] <scwizard> omg
[20:23:38] <scwizard> it was just I need to log into the "admin" database specifically :|
[20:24:03] <GothAlice> scwizard: :) That, or specify an authentication database explicitly. I.e. you can "connect" to one DB, while using users from another.
[20:24:53] <GothAlice> https://docs.mongodb.com/manual/reference/program/mongo/#authentication-options
[21:07:16] <scwizard> I'm trying to automatically initalize a replica set and create an admin user
[21:07:40] <scwizard> doing it manually things are fine, but with automation, the admin user attempts to be created before the initial member becomes the primary
[21:08:11] <scwizard> is there a better way of approaching this than "wait 1" or similar
[21:10:41] <scwizard> ugg fine i'll just do sleep(500)
[21:12:55] <scwizard> -.-
[21:13:01] <scwizard> it even says " "stateStr" : "PRIMARY","
[21:13:04] <scwizard> but it still gives
[21:13:10] <scwizard> 2016-09-22T23:01:55.264+0200 E QUERY [thread1] Error: couldn't add user: not master :
[21:13:19] <amacleod> I'm a bit confused by javascript driver 2.2 behavior. When I try to connect to my replica set, I expect MongoClient.connect(myurl, function(err, db) { ... }) to either put null or a MongoError in as the first argument, but I seem to be getting something that says it is a ReplSet in there. Is it normal for the error to be a ReplSet object?
[21:13:48] <amacleod> (I think it is a ReplSet because the string from util.inspect(err) starts with ReplSet)
[21:23:10] <zylo4747> i have a copy of a replica set environment (cloned VMs). I updated the keyfile value, the IP, and the replica set name in the config. I want to wipe out the replica set configuration stored in local.system.replset but i can't. Even when I start a node with no replica set configuration it tells me user admin is not authorized to delete from that collection
[21:23:20] <zylo4747> how can i wipe the configuration so i can use the new host names
[21:24:20] <zylo4747> i read elsewhere that i should stop the replica set and then delete the local db... is that the way to go?
[22:04:31] <Doyle> This is what I remembered reading about in terms of ext4 vs xfs. It's ext4's per-inode mutex. http://edgystuff.tumblr.com/post/81219256714/tips-to-check-and-improve-your-storage-io, which references this ticket. https://jira.mongodb.org/browse/SERVER-13417
[22:04:57] <Doyle> High write workloads seem to benefit form xfs.