runzhiwang commented on pull request #264:
URL: https://github.com/apache/incubator-ratis/pull/264#issuecomment-724388442


   > > > there will be a deadlock case that a server will receive a request, 
and then route to other peers, and other peers will do the same
   > > 
   > > 
   > > Could you explain the deadlock clearer ? which lock was held and which 
lock was waited?
   > 
   > For a normal cluster, every server can be a primary server
   > 
   > ```
   > A ----B
   > \    /
   > \   /
   >   C
   > ```
   > 
   > In previous implementation, if A receives a header request, it will 
forward to B and C. And then B and C will also forward the request to A and C ( 
A and B). So in this case, A will wait its peers to reply on the header 
request, same for B and C. Because each peer will wait for others to reply, I 
will call this is a "deadlock" situation.
   
   @amaliujia Thanks for explanation.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to