[00:00:12] <cheeser> well, in morphia that'd be @Embedded
[00:01:23] <livinded> If I have documents in two collections is there a good way to select one from the first collection and one from the second then embed the second into the first with a specified key in mongo or is that something I should perform in my application?
[03:28:13] <Sargun> Does MongoDB gaurantee recency?
[17:05:23] <jpadilla> hey guys i have a document that contains a field with an array [{"date": Date, "value": 1}]. I'd like to return all documents but filter the items in the array by date. Is this possible?
[17:06:30] <kali> you can do it with the aggregation framework, but why don't you jsut handle that in the application side ?
[17:07:45] <jpadilla> kali, when with the aggregation framework first and kinda got it working. just wondering if there was a better way. I can definitely handle it in the application side
[17:07:49] <Neutron1> Hi, Can some one say me. How I can sync only from a secondary node to other secondary nodes?
[17:09:20] <kali> jpadilla: then i would do it application side. the application side is easy to scale, so anything that can get be done there with no aditional problem should go there :)
[17:09:58] <kali> Neutron1: i don't understand your question.
[17:13:02] <Neutron1> kali: I have a 4 node replica set(1 primary, 2 secondary and 1 arbiter... i wanted to add 2-3 nodes to this replica set.. and i want these new nodes to sync data from existing secondary nodes and not from the primary node.
[17:14:55] <kali> why on earth do you have a 3 nodes + 1 arbiter configuration ?
[17:15:53] <Neutron1> if the primary goes down, one among the 2 secondaries can be elected as a primary.
[17:16:40] <kali> you don't need an arbiter for that. arbiter are meant to make the vote chorum odd and not even, you just use it for exactly the opposite
[17:18:16] <Neutron1> If the arbiter isn't there, the set will be left with 2 secondaries if the primary node goes down.
[17:18:16] <Neutron1> which will create a tie in election. me thinks.
[17:19:16] <kali> believe me you don't want that arbiter there
[17:19:48] <kali> you need to consider the total voute count of your cluster, and make this odd, not even
[17:20:07] <kali> that's why you need an arbiter when you have a even number of nodes
[17:20:51] <kali> when one single node fails in a three nodes cluster, there is 66% of the total vote count, the two remaining secondaries will negotiate and elect one of them
[17:20:59] <Neutron1> ok. I agree.. I'm new to mongodb.. thanks for suggesting this.
[17:22:53] <Neutron1> and is there a way to sync only from the secondaries after the node getting into the "secondary" state?
[17:24:02] <Neutron1> kali: and i think, syncing data to 5 secondaries from primary over loads it. Am I right?
[17:24:16] <kali> depends on the load and configuration :)
[17:26:18] <Neutron1> kali: ok, let me re-phrase the question, is there a way to sycn data only from a single secondary node(which sync from primary)?
[17:26:56] <kali> Neutron1: i think for these kind of cases, the doc mention the old manual replication (aka master-slave)
[17:27:05] <kali> but... what kind of monster are you building ?
[17:30:16] <Neutron1> kali: Here's my requirement: I currently have 4 nodes in prod(3 normal nodes + 1 arbiter).. I want to setup a Disaster recovery for this set.
[17:30:16] <Neutron1> I'm thinking for adding 4 more nodes and these have priority=0 and sync data only from a secondary node in prod.
[17:30:48] <Neutron1> this is still in testing phase. Its not real prod(production)
[17:33:17] <Neutron1> if the prod DC is completely unreachable, I should be able to write to these new 4 hosts. I know, this need some manual intervention as it won't happen automatically.. as these have priority=0.
[17:34:46] <Neutron1> kali: any idea? I'm doing it right?
[18:18:15] <jparkton> I just installed mongodb on my server and know nada about it, I am familiar with sql but am moving over to mongo for the sake of meteor apps. Can someone point me to a document where I can learn to connect to my db server and create users and tables etc?