Browse files

Remove reject of paxos_msghdr

Signed-off-by: Guangliang Zhao <gzhao@suse.com>
  • Loading branch information...
1 parent 8a74043 commit d984df8eb8144368d14f060735a05dc78bf6c5e6 @glzhao glzhao committed Apr 20, 2012
Showing with 0 additions and 20 deletions.
  1. +0 −20 src/paxos.c
View
20 src/paxos.c
@@ -50,7 +50,6 @@ struct paxos_msghdr {
char psname[PAXOS_NAME_LEN+1];
char piname[PAXOS_NAME_LEN+1];
int ballot_number;
- int reject;
int proposer_id;
unsigned int extralen;
unsigned int valuelen;
@@ -242,14 +241,6 @@ static void proposer_propose(struct paxos_space *ps,
return;
}
- if (ntohl(hdr->reject)) {
- log_debug("proposal was rejected");
- pi->round = ballot;
- pi->proposer->state = INIT;
- pi->end(pih, pi->round, -EAGAIN);
- return;
- }
-
extra = (char *)msg + sizeof(struct paxos_msghdr);
if (ps->p_op->is_prepared) {
if (ps->p_op->is_prepared(pih, extra))
@@ -369,12 +360,6 @@ static void acceptor_promise(struct paxos_space *ps,
log_debug("ballot number: %d, highest promised: %d",
ntohl(hdr->ballot_number),
pi->acceptor->highest_promised);
- to = ntohl(hdr->from);
- hdr->from = htonl(ps->p_op->get_myid());
- hdr->state = htonl(PROMISING);
- hdr->reject = htonl(1);
- memset(extra, 0, ps->extralen);
- ps->p_op->send(to, msg, msglen);
return;
}
pi->acceptor->highest_promised = ntohl(hdr->ballot_number);
@@ -420,11 +405,6 @@ static void acceptor_accepted(struct paxos_space *ps,
if (ballot < pi->acceptor->highest_promised) {
log_debug("ballot: %d, highest promised: %d",
ballot, pi->acceptor->highest_promised);
- to = ntohl(hdr->from);
- hdr->from = htonl(myid);
- hdr->state = htonl(ACCEPTING);
- hdr->reject = htonl(1);
- ps->p_op->send(to, hdr, sizeof(struct paxos_msghdr));
return;
}

0 comments on commit d984df8

Please sign in to comment.