All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kang Wang <beijingwangkang@gmail.com>
To: ceph-devel@vger.kernel.org
Subject: Question about ceph paxos implementation
Date: Mon, 27 Nov 2017 21:14:05 +0800	[thread overview]
Message-ID: <C3CABE81-22E1-4B8E-AA5A-22CEBF5D45A9@gmail.com> (raw)

hi

I read the code of ceph paxos recently, and have a question about it, which, in my opinion, may violate the consistency.

Assume we have five monitor node m1, m2, m3, m4, m5, the prior one has larger rank than the back one. 

Consider the situation as below:

1, m1 as the leader, and all node have the same last_commited at begin, then m1 propose a new value ‘2', which then be accept by m1 and m3:
m1:   1 2
m2:   1
m3:   1 2
m4:   1
m5:   1	

2, Unfortunatly, both m1 and m3 go down, and m2 become leader without knowledge about the propse, and it propose a new value ‘3' 
m1:   1 2  down 
m2:   1 3
m3:   1 2  down
m4:   1
m5:   1	

3, Then m2 goes down before send anything to others, then m1, m3 recovered and commit value ‘2’ with the quorum m1, m3, m4
m1:   1 2
m2:   1 3  down
m3:   1 2
m4:   1 2
m5:   1	

4, Before the commit message sent to others, m1 and m3 go down again. So value ‘3’ only commit on m1. Then m2 become leader once more.
m1:   1 2  down
m2:   1 3
m3:   1 2  down
m4:   1 2
m5:   1

5, Leader m2 see the uncommited value ‘2’, but discard it by compare uncommitted_pn in function handle_last, so it commit value ‘3’ with the quorum m2, m4, m5
m1:   1 2  down
m2:   1 3
m3:   1 2  down
m4:   1 3
m5:   1 3

Now we see the value ‘2’ has been commited, but lost soon. Am I right on it?


Thanks
WANG KANG

 

             reply	other threads:[~2017-11-27 13:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 13:14 Kang Wang [this message]
2017-11-27 14:27 ` Question about ceph paxos implementation Sage Weil
2017-11-28  3:20   ` Kang Wang
2017-11-28 13:06     ` Sage Weil
2017-11-29  6:54       ` Kang Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C3CABE81-22E1-4B8E-AA5A-22CEBF5D45A9@gmail.com \
    --to=beijingwangkang@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.