[00:01:32] <curlhelp> In MongoDB is it better to have a parent record with an array of child IDs? Or for every child to have a "parent" column with the parent ID? Which is more efficient/cost effective memory wise?
[00:04:52] <cheeser> (this is why crossposting is bad. it fragments the conversation.)
[00:05:03] <curlhelp> ahh ok @cheeser thanks (and sorry will remember next time)
[00:05:22] <curlhelp> to expand on your answer, however (for records); "The children should have parent IDs so that the number of children can grow without bound. Putting children IDs in the parent would cause the parent document to grow over time leading to document moves as the doc needs more space on disk and ultimately the 16MB limit on doc sizes. Though if you get to that 16MB limit you probably have other issues..."
[00:05:30] <curlhelp> is that a limit for an item in a collection?
[00:07:21] <curlhelp> interesting... yeah so i think i'll definitely go with the children with parent id approach
[00:07:55] <curlhelp> if i want to track something like "facebook" likes (dw i'm not building another social media thing lol), would a "post" have "liked_by":[iD, ID, ID]
[00:08:12] <curlhelp> or for that should i create another collection "upvotes"
[00:08:14] <StephenLynx> embedded children are good if you expect the children to have multiple parents, to be complex cases or to have a limited number of children.
[00:08:30] <curlhelp> yeah expecting a few thousand
[00:08:33] <cheeser> curlhelp: in that case, yes. separate collection because those are different entities.
[05:42:51] <Jonno_FTW> can anyone help with the nodejs driver?
[05:43:00] <Jonno_FTW> every time I do a query I get 0 results
[05:47:22] <Boomtime> @Jonno_FTW: there are complete self-contained examples here: https://mongodb.github.io/node-mongodb-native/api-articles/nodekoarticle1.html#time-to-query
[05:48:08] <Boomtime> you should also test every query in the mongo shell
[05:52:17] <Jonno_FTW> Boomtime: is there a decent node shell?
[05:57:45] <Boomtime> Jonno_FTW: what's wrong with the regular mongo shell? you need to test the query first
[05:58:23] <Boomtime> "every time I do a query I get 0 results" -> and is that not correct?
[05:59:02] <Boomtime> what does the exact same query do in the mongo shell?
[05:59:53] <Boomtime> if you provide the output from each of these things, and pastebin it - the call you make in node, and the query line from the mongo shell, someone here might be able to determine what is wrong
[06:00:42] <Jonno_FTW> Boomtime: here's my script: http://pastebin.ws/f5l639
[06:00:48] <synthmeat> anyone managed to build mongodb 3.x on freebsd?
[06:01:41] <Jonno_FTW> woops nvm, turns out I suck at nodejs
[06:01:50] <Jonno_FTW> was exiting/closing before the result came back
[09:09:10] <mapc> Specifically we're having the problem, that we have some very expensive, long running queries and we'd like to give them a lower priority/nice value
[09:09:39] <mapc> so those queries are just using any leftover resources and not claiming any resources for their own.
[09:17:03] <vagelis> Is it possible to find the document with the most fields? :S
[09:18:18] <gcfhvjbkn> i get "could not verify that config servers are in sync" error on my mongos instances; after googling a little bit i see that i should find the problem on my own and fix it manually; my problem is that i don't really know what to look for, it doesn't seem to be any documentation about this
[09:19:18] <gcfhvjbkn> s/it doesn't seem to be any/it seems there is no
[09:26:11] <gcfhvjbkn> btw is it ok if some of the configservers only have two tables in "config" db? ("lock" and "lockpings") out of all these http://docs.mongodb.org/manual/reference/config-database/
[10:09:42] <gcfhvjbkn> what happens if i wipe out configsvr data folder? do i lose my data?
[14:03:03] <EricL> I have a sharded Mongo 2.4 cluster with 3 shards, 3 replicas per shard. I am trying to reduce it down to 2 shards. I followed these instructions: http://docs.mongodb.org/v2.4/tutorial/remove-shards-from-cluster/ and have made it to the point where I am just checking the status. However the remaining chunks hasn't changed since I started it an hour ago and the status is "draining ongoing". How do I know if something is happening?
[14:03:08] <EricL> I don't see anything in the logs.
[14:49:22] <EricL> I have a sharded Mongo 2.4 cluster with 3 shards, 3 replicas per shard. I am trying to reduce it down to 2 shards. I followed these instructions: http://docs.mongodb.org/v2.4/tutorial/remove-shards-from-cluster/ and have made it to the point where I am just checking the status. However the remaining chunks hasn't changed since I started it two hours ago and the status is "draining ongoing". How do I know if something is happening? I
[16:02:42] <EricL> I have a sharded Mongo 2.4 cluster with 3 shards, 3 replicas per shard. I am trying to reduce it down to 2 shards. I followed these instructions: http://docs.mongodb.org/v2.4/tutorial/remove-shards-from-cluster/ and have made it to the point where I am just checking the status. However the remaining chunks hasn't changed since I started it two hours ago and the status is "draining ongoing". How do I know if something is happening? I
[16:29:48] <kashike> does mongodb 3.0.6 not work on ubuntu 15.04?
[16:31:27] <StephenLynx> not officially supported.
[16:32:00] <kashike> looks like I'm downgrading to 2.6.3 :(
[16:32:07] <StephenLynx> if you are going to use ubuntu (which is not recommended for a server by a considerable amount of people) you would be better using 14.
[16:32:12] <StephenLynx> or use a good server distro.
[16:32:54] <kashike> it's a bit too late to be switching OS's
[16:33:02] <StephenLynx> I personally can recommend centOS for use with mongo.
[16:36:35] <kashike> is there really no fix for this? running the mongod process manually works, just the init script doesn't work
[16:39:22] <BadCodSmell> They do things like patch in loads of random patches
[16:39:26] <StephenLynx> yeah, debian is bad for servers.
[16:39:32] <BadCodSmell> so even sourcing their packages and manually building an update is a nightmare
[16:39:37] <StephenLynx> anything derivate from debian is, IMO.
[16:39:53] <BadCodSmell> at least with things like centos you know all those patches are almost always going to be to make it build properly or backports andway you can ignore
[16:39:56] <StephenLynx> for a server you either want a rolling distro or something derivate from RHEL
[16:40:15] <StephenLynx> a rolling distro will just have the issue with possible instability.
[16:40:26] <StephenLynx> but you will never be left out.
[16:40:39] <BadCodSmell> one package in debian I tried to manually update but gave up after it had several patches including new features including a 100k patch to add ipv6 and a massive patch to add authentication
[16:41:02] <BadCodSmell> And where they get those patches from *shrugs* unofficial pull requests in git?
[16:42:19] <BadCodSmell> and if you look at the complexity of their packaging and how much work they give themselves compared to a simple spec file, OMG, and the awful quality of the huge helper bash scripts (vomit)
[16:47:29] <StephenLynx> there was no such process called mongod.
[16:48:11] <StephenLynx> at least at /usr/bin/mongod
[16:48:17] <bendem> it's very clear it didn't spawn, doesn't make it helpful in anyway tho
[16:48:44] <StephenLynx> have you tried running which mongod?
[19:04:33] <mprelude> http://stackoverflow.com/questions/32486579/implementing-mongodb-sasl-authentication-in-cl-mongo In case anyone knows how this works? Have got SCRAM implemented, but having issues making initial request.
[19:11:10] <StephenLynx> cam lisp interface with C binaries?
[19:13:22] <mprelude> StephenLynx: Yes, but that removes the portability
[19:54:45] <saml> how can I make a hot standby node?
[19:55:37] <saml> i don't want clients to be connected to the hot standby member with mongodb://mongo1,mongo2,mongo3/test where mongo4 is hot standby
[19:56:13] <saml> but mongo4 gets all content of mongo1,mongo2,mong3 (rs0)
[20:21:29] <Doyle> Does anyone know if the response to this ticket is accurate? https://jira.mongodb.org/browse/SERVER-19261 "local.oplog.rs Assertion failure a() != -1 src/mongo/db/storage/record.cpp 538"
[20:21:53] <Doyle> Data corruption via network or disk?
[20:22:27] <cheeser> did you do as requested and ask on mongodb-user?
[20:22:56] <cheeser> and, yes, since it came from a mongodb emp, i'd consider it fairly accurate.
[20:35:05] <Doyle> Interesting. I hadn't noticed before, but the lgoSizeMB reports the default 51200, while the local db is 120GB, as set when I adjusted the oplog size initially.
[20:39:11] <Doyle> Immediately before the assertion failure, "replSet initial sync cloning db: test"
[20:39:30] <Doyle> I'm not a super mongodb guy yet, working on it, but that seems fishy to me.
[22:15:06] <EricL> I have a sharded Mongo 2.4 cluster with 3 shards, 3 replicas per shard. I am trying to reduce it down to 2 shards. I followed these instructions: http://docs.mongodb.org/v2.4/tutorial/remove-shards-from-cluster/ and have made it to the point where I am just checking the status. However the remaining chunks hasn't changed since I started it two hours ago and the status is "draining ongoing". How do I know if something is happening?
[22:15:32] <EricL> Sorry, started it ten hours ago.
[22:28:24] <Fernandos> I added a new array field to my schema. How can I extend existing objects in a collection that don't have this field? Creating new objects is no problem, but editing objects created without that field doesn't work.
[22:31:55] <tejasmanohar> what mongodb query can i use to add a certain field to all documents?
[22:32:01] <tejasmanohar> add if it doesn't already exist is preferable