Paxos: monitor declare victory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
  I'm studying Paxos in Ceph because I need to add one new
  PaxosService.

  In Ceph, the Paxos is based on a single-proposer & multi-acceptors.
  So, the quorum need choose the single-proposer(leader) first.

  It seems that there're two ways to choose one monitor as leader:
  I'm curious that why their pre-conditions are different.
                             ------------
  This doesn't block me to continue my development work. I just want to
  know why.
  Does anyone know that reason?
  I. Normal way:
     Elector::handle_ack
     |--> logic.receive_ack(peer_rank, m->epoch);
          |--> declare_victory();
               // Note: pre-condition is below
                        -------------
                  electing_me && (acked_me.size() == elector->paxos_size())
  II. Another way if timeout event happen:
     Elector::_start() or Elector::_defer_to
     |--> reset_timer();
          |--> expire_event = mon->timer.add_event_after(
                                g_conf()->mon_election_timeout + plus,
                                new C_MonContext{
                                      mon, [this](int) {
                                             logic.end_election_period();
                                           }
                                });
     When timeout happens:
     ElectionLogic::end_election_period()
     |--> declare_victory();
          // Note: pre-condition is below
                   -------------
              electing_me && acked_me.size() > (elector->paxos_size() / 2)

B.R.
Changcheng
_______________________________________________
Dev mailing list -- dev@xxxxxxx
To unsubscribe send an email to dev-leave@xxxxxxx



[Index of Archives]     [CEPH Users]     [Ceph Devel]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux