From http://zookeeper.apache.org/doc/r3.4.6/zookeeperInternals.html:

There is a corner case in which a follower that has proposals, U, not seen by a 
leader arrives. Proposals are seen in order, so the proposals of U will have a 
zxids higher than zxids seen by the leader. The follower must have arrived 
after the leader election, otherwise the follower would have been elected 
leader given that it has seen a higher zxid. Since committed proposals must be 
seen by a quorum of servers, and a quorum of servers that elected the leader 
did not see U, the proposals of you have not been committed, so they can be 
discarded. When the follower connects to the leader, the leader will tell the 
follower to discard U.


-Brian


On Jan 6, 2015, at 4:19 PM, Ibrahim 
<[email protected]<mailto:[email protected]>> wrote:

Thank you Edward for replaying.

In my opinion, your first case can’t happen, because the election mechanism 
will elect the node that has the latest transaction  (zxid) seen. In this case, 
it will be only your second case is correct, unless the node that has latest 
transaction crashes forever.

Ibrahim
From: Edward Carter [via zookeeper-user] 
[mailto:[email protected]]
Sent: Tuesday, January 06, 2015 11:53 م
To: Ibrahim El-sanosi (PGR)
Subject: Re: Question about the two-phrase commit

If an operation is logged to disk on a minority of servers, then what happens 
on restart depends on which server wins the leader election.  Since the new 
operation is on a minority, depending on network conditions, a server that did 
*not* log the operation might win the leader election.  In this case, the 
operation will be discarded.  If a server that *did* log the operation wins the 
leader election (as would be the case in the absence of network or latency 
issues), then the operation will be propagated to the remaining servers in the 
ensemble.

Edward

On Jan 6, 2015, at 3:42 PM, Ibrahim <[hidden 
email]</user/SendEmail.jtp?type=node&node=7580741&i=0>> wrote:

Hi Alexander,

So, you meant that if there is operation loged to the disk but it hasn't got
enough majority, then if the zookeeper servers restart, the new leader will
re-broadcast the loged operation again to the followers to commit that
operation.

Does above what you meant by (NEWLEADER message acts as the accept and
UPTODATE message acts as commit).

Am I right?

Thank you

Ibrahim



--
View this message in context: 
https://urldefense.proofpoint.com/v1/url?u=http://zookeeper-user.578899.n2.nabble.com/Question-about-the-two-phrase-commit-tp7580725p7580739.html&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=09h%2FR60Z1NzKuJcTv9DkEw%3D%3D%0A&m=T7mEM8unY7tsVTbHXoSOqvwXEZEBCs8%2BRWl0cT03ruo%3D%0A&s=bcce5c88300c51126777473143b3f560542cf1c5699b33283f888e27ed41529f
Sent from the zookeeper-user mailing list archive at 
Nabble.com<http://Nabble.com>.


________________________________
If you reply to this email, your message will be added to the discussion below:
http://zookeeper-user.578899.n2.nabble.com/Question-about-the-two-phrase-commit-tp7580725p7580741.html
To unsubscribe from Question about the two-phrase commit, click 
here<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7580725&code=aS5zLmVsLXNhbm9zaUBuZXdjYXN0bGUuYWMudWt8NzU4MDcyNXw1NTE4MjI0Njk=>.
NAML<http://zookeeper-user.578899.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: 
http://zookeeper-user.578899.n2.nabble.com/Question-about-the-two-phrase-commit-tp7580725p7580743.html
Sent from the zookeeper-user mailing list archive at 
Nabble.com<http://nabble.com/>.

Reply via email to