[02:13:29] <flaf> Is it possible to have a replica set _and_ auth=true with mongo 2.4?
[02:15:09] <flaf> When I create my first user the replica set seems to be down.
[02:17:56] <Waheedi> flaf: this is the best you can find around auth and replica sets https://docs.mongodb.org/manual/tutorial/enable-internal-authentication/
[02:19:04] <flaf> Waheedi: this page concerns mongo 3.2
[02:39:21] <flaf> In fact this https://docs.mongodb.org/v2.4/tutorial/deploy-replica-set/ is absolutely fine. But all is down when I create my first user.
[02:40:44] <flaf> For information, to create my first user, I have launched “mongo <create.js” in my shell bash where create.js is this file http://paste.alacon.org/39270
[02:41:44] <Waheedi> I would rather type that on mongo
[02:41:47] <Waheedi> and then db.system.users.find()
[15:03:13] <dbounds> Hello. Occasionally (once every one or two weeks) I start noticing the load avg on my DB creep up and query response along with it. At the times when this happens there doesn't appear to be any system work happening or anything IO related that's unusual.
[15:03:36] <dbounds> What solves the problem immediately is droping and recreating an index.
[15:04:05] <dbounds> I'm not sure why, but it does. Can anyone provide any insight into what may be happening here?
[15:17:07] <tnViking> when I do .find("tags": "yellow"), it prints out a whole bunch of stuff I'm not looking for, but when I do .findOne("tags": "yellow") it finds the first with yellow tag. But I've got several entries with yellow tag, so how can I get it to work?
[15:20:39] <dbounds> tnViking. find() will give you all the results, findOne will give you the first. pretty semantic.
[15:21:12] <dbounds> also, I assume your criteria was actually find({"tags":"yellow"})
[15:21:57] <tnViking> Yeah, this is what I get http://kopy.io/4XIyZ
[15:26:16] <dbounds> but you said findOne() was working, show me the find() query.
[15:26:45] <tnViking> it's the same, but just with find() instead of findOne()
[15:37:41] <dbounds> what happens if you don't specify any criteria? Are you sure that collection isn't filled with other data?
[15:38:01] <tnViking> when I use MongoChef, and do the query {"tags": {$all: ["yellow"]}}, it's run in a .find(), and it outputs all entries with said tag
[15:39:05] <tnViking> With no criteria, it gives me the same
[15:42:59] <tnViking> this is my entries within the pictures collection http://kopy.io/78DID
[15:44:35] <dbounds> it sounds like something is jacked with your collection then.
[15:44:50] <dbounds> but I'm not expert. I'm here for help as well. ;)
[15:57:33] <tnViking> because what I want is really to choose 1 randomly from the entires with the tags, so if there's 10 entries with tag "Yellow", it randomly picks number #4, so I can't use findOne
[17:23:34] <tnViking> How dbounds, how then could I count how many it finds?, I tried db.collection("pictures").find({"tags": {$all: tags}}).count(), but it gives me Promise { <rejected> [Error: write after end]}
[18:13:55] <dbounds> tnViking, you should read the docs. This is all very well documented.
[22:55:02] <morf> can i ask questions about morphia here?