[00:51:03] <pksadiq> When I create a new schema, what is the first field of the key valu pair called in mongodb's terms: say like what to call owner, title, and date (is it key, or field, or something else?) in 'new Schema({ owner : ObjectId , title : String , date : Date });' (the code is from mongoose)
[02:43:21] <k_sze> Is there a strict order in which I should start the configdb, the replica set, and mongos? I can't remember. It's been too long.
[06:05:15] <DarkCthulhu> So, if I am trying to configure a replicaset using just the configuration files, is this possible?
[06:05:46] <DarkCthulhu> Or must I always go via the mongo client and rs.initiate() and so on?
[06:23:10] <Boomtime> @DarkCthulhu: both, the config file is local information only (thus, the name of the replica-set this host expects to particpate in), rs.initiate/add/remove are group commands, these involve all members of the set
[08:54:13] <virtualsex> { "ok" : 0, "errmsg" : "no such cmd: replSetInitiate", "code" : 59 }
[08:58:01] <virtualsex> please give a page for command addshard
[09:09:34] <Derick> Zelest: what are you thinking of?
[09:10:04] <Zelest> oh yeah, sorry, forgot this chat.. haha
[09:10:53] <Zelest> Derick, OpenBSD is having W^X mandatory in upcoming 6.1.. in 6.0, they just log W^X violations in order to log and fix things.. It would be really nice to see those fixes applied upstream later on.
[12:47:41] <malorie> hi all! I'm trying to use mongodb for a small project, and was wondering, wether there's something like a convenient web-ui for data-entry? or should I write my own forms, etc.?
[12:59:37] <StephenLynx> using mongo's terminal client is pretty good.
[12:59:49] <StephenLynx> I wouldn't bother with a GUI for inserting development data.
[13:33:13] <deathanchor> malorie: are you generating random data or specific data? or are you migrating some data from another source?
[13:34:05] <malorie> I'm creating data, think dictionary entries. but I'm beginning to question whether nosql is the right choice for me
[13:34:38] <deathanchor> I forget does mongo3.2 have join functionality now? or is that still on the roadmap?
[13:35:28] <deathanchor> malorie: I always choose nosql, but that's because I always hated RDBs. My thought processes always worked with nosql architecture.
[13:35:59] <malorie> but what about many-many relations?
[13:36:03] <deathanchor> and I grew up learning DBase IV
[13:36:16] <malorie> afaiu nosql is suited for tree-like structures, right?
[13:36:45] <deathanchor> malorie: with nosql there are no relations, it's all about how your application would query what is needed, join/parse/process after it go the data.
[13:37:42] <deathanchor> many-many relationships are pain regardless of RDB or nosql.
[13:38:07] <StephenLynx> I usually lean towards mongodb. not that I hate rdbs, I just don't find all their features and constraints required.
[13:42:16] <malorie> deathanchor: you're saying that there are no relations in nosql, then how do you relate things? you have to have some kind of keys present at least, I pressume
[13:42:45] <bethge> Hi, does anyone have advice on automatically restarting a crashed mongodb on an aws linux?
[13:43:19] <deathanchor> malorie: you make the relations however you want, you can use the _id (autogenrated always unique identifier) or you can do whatever you want
[13:43:19] <StephenLynx> malorie, you just create fields that allow you to relate stuff.
[13:43:28] <StephenLynx> but these relations are not validated on the database.
[13:43:38] <StephenLynx> as far as the server knows, they are just yet another field.
[13:43:49] <StephenLynx> unless, of course, you use the new schema validation feature.
[17:37:23] <sinni800> StephenLynx: somehow that seems like excuses, I can see if I am using replicas and sharding that they will try to sync and maintain
[17:37:37] <sinni800> but software even today can be made efficient and not wasteful of resources
[17:38:36] <StephenLynx> one thing is being wasteful
[19:05:36] <tinco> so you don't know if this is possible? or doesn't it work at all?
[19:09:05] <tombin_> hello, i'm going through my first mongodb maintenance window and we need to change the hardware for one of the config server in our sharded cluster. do i need to do anything special to the cluster, or can i just take down the config server, replace the hardware and turn it back up and it will sync with the rest of the config cluster ?
[19:18:20] <StephenLynx> no, I don't have much experience managing deploys, just developing using mongo.
[19:18:33] <StephenLynx> I just thought it was really weird the version you said you were using.
[19:31:16] <AndrewYoung> tinco: Can you describe your environment a bit more?
[19:31:36] <AndrewYoung> You have a sharded cluster, with each shard being a replica set, and one server in one shard's replica set died?
[19:33:04] <AndrewYoung> tombin_: What version of MongoDB are you running?
[19:46:18] <tinco> AndrewYoung: yes exactly, so I'm thinking I'll add 2 new machines, we have them ready to go into the set anyway, to take on the write load, and then disable writes to the defunct shard
[19:46:54] <tinco> then we could simply wait until all the chunks on the defunct shard are empty
[19:47:41] <tinco> any data that's there will be stale and removed after about 4 weeks
[19:48:53] <tinco> I've been looking through the docs and couldn't find it exactly, there's the removeShard command, but it will attempt to move chunks, which I feel might bog the system down as well, not sure
[19:49:01] <tinco> it's a bit awkward that this data is on HDD's
[19:54:49] <AndrewYoung> You can also move data by hand to another shard.
[19:55:52] <AndrewYoung> But only one of the replica set members in that shard is defunct, right?
[19:56:54] <AndrewYoung> I don't think you need to remove the shard at all, you just need to bring up a new member of the replica set, then set that member to replicate from one of your secondaries. That way it won't negatively affect the performance of the primary that is servicing your customers.
[19:58:22] <AndrewYoung> Unless you're reading from secondaries. (Which would make sense if your data is write-only.
[20:00:11] <tinco> we have replicasets of only 2, so the only node that's active is a primary
[20:05:08] <AndrewYoung> While its locked it can still read but it won't update the files on disk.
[20:05:32] <AndrewYoung> Then you can copy the data directory over to the new box while mongod is shut down on the new box.
[20:05:47] <AndrewYoung> And once it's done you unlock the primary and fire up the new secondary.
[20:08:52] <AndrewYoung> I realize there's extra cost involved, but running with 3 replica set members helps alleviate this issue. For one, it allows for an election if one of the replica set members fails, and secondly it allows the replacement member to sync from the secondary.
[20:09:16] <AndrewYoung> Do you have an arbiter in your configuration?
[20:17:55] <AndrewYoung> You could tag all the other shards with some tag like "ACTIVE" and you could make a shard key range that includes all your shard keys and tag that range as "ACTIVE".
[20:18:15] <AndrewYoung> Then new chunks would only go to the shards tagged "ACTIVE".
[20:19:07] <AndrewYoung> But, I think that will actively move data off the shard.
[20:19:21] <AndrewYoung> In which case you might as well just remove the shard.
[20:22:43] <tinco> oh but our balancer is disabled
[20:22:58] <tinco> so it wouldn't actually go move those chunks
[20:23:02] <tinco> I think this might be the solution
[20:26:25] <tinco> thanks AndrewYoung I'm going to work this plan out :D
[21:15:00] <tombin_> tinco: sorry for the late reply, i'm running 3.2
[21:26:48] <docmur> Is it possible to change commands? so something like db.col1.col2.drop()
[23:20:29] <silasbarta_> So ... I'm on Mongodb 3.0. When I do db.currentOp() on admin, I get negative opIds like -1697108067. I understand that it may be an issue of it converting unsigned 32 bits to signed 32 bits ... but I'm still rapidly reaching 2^32 total operations. Should I be worried?
[23:20:54] <cheeser> probably not. unless they're all running at once.
[23:21:16] <cheeser> then i'd have some serious discussions with your devs. :)
[23:22:32] <silasbarta_> @cheeser Yes but if it exceeds 2^32 total ops, it will overflow, right? And then the server will thing that a later operation came before an earlier one?
[23:23:17] <cheeser> i don't think it uses those for anything but discrete IDs
[23:24:56] <silasbarta_> Hm, okay. But doesn't it have to keep a strict ordering for replica sets?
[23:25:40] <cheeser> no, that'd all get recorded in the oplog. i don't think the opId gets logged.
[23:27:10] <AvianFlu> I don't think replicas apply things serially in the first place
[23:27:14] <silasbarta_> Hm, okay, thanks. Had me worried. Doubly so that no one else seems to be posting questions about that :-/
[23:27:16] <AvianFlu> I think it gets applied in batches in parallel
[23:27:43] <cheeser> well, they get applied in the order things happened on the primary, sure.