janl commented on issue #756: Make couch_peruser a proper Erlang app
URL: https://github.com/apache/couchdb/pull/756#issuecomment-334851376
 
 
   Bit of help from @nickva 
   
   [21:25:20]  <vatamane>       the logic is mostly isolated to 
https://github.com/apache/couchdb/blob/master/src/couch_replicator/src/couch_replicator_clustering.erl
   [21:27:26]  <vatamane>       there are 2 main bits to consider : how to 
distribute the things across the nodes (see the owner functions) and what to do 
if node configuration changes (nodes added or removed)
   [21:29:39]  <vatamane>       the insight with the first point (how to 
distribute things) is that it's an algorithm that runs on all the nodes 
concurrently, and the result on all nodes should all agree who the owner is 
(given they have the same list of connected nodes)
   [21:30:34]  <vatamane>       so node1 sees the thing and says, "not mine, 
node2 owns, I'll ignore it", node3 does the same and node2 sees and say "yap I 
own, I'll take care of it"
   [21:38:19]  <+Wohali>        not just nodes added/removed, also "node fails 
or is temporarily gone" right?
   [21:39:11]  <vatamane>       yap
   [21:40:56]  <vatamane>       the list of nodes is an input to the algorithm, 
that list might include nodes in maintenance or might not, or may only include 
nodes where the shard of a particular db/docid live
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to