Ok, this is really interesting. In this case, we can say that the new leader 
has to re-broadcast all logged operations,  it doesn’t matter whether the 
operation gets the acknowledgment from quorum or not, because the leader can’t 
distinguish  between committed logged operation and non-committed logged 
operation.

I am also thinking, when the ensemble establishes, the leader apply the 
snapshot in-memory before log file, in this case the leader will only 
re-broadcast the operation that hasn’t got enough majority (quorum) before 
crashes. If this is true, my above statement will be wrong.

Which one of both statement is correct?

Thank you

Ibrahim





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

Yes, if the leader has this operation in its log (not guaranteed if it
wasn't acked by majority in previous ensemble, but possible), the leader
will make sure that a quorum of followers in the new ensemble has this
operation before doing anything else in the new ensemble.

Alex

On Tue, Jan 6, 2015 at 3:42 PM, Ibrahim <[hidden 
email]</user/SendEmail.jtp?type=node&node=7580740&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:
> http://zookeeper-user.578899.n2.nabble.com/Question-about-the-two-phrase-commit-tp7580725p7580739.html
> Sent from the zookeeper-user mailing list archive at 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-tp7580725p7580740.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-tp7580725p7580742.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Reply via email to