Skip to content

Commit

Permalink
Resend Accept on message resubmission
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomezferro committed Oct 18, 2012
1 parent 45fab48 commit 7dcefe5
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -75,11 +75,13 @@ public List<PaxosDescriptor> processMessage(Request message, PaxosState state) {
descriptors = new ArrayList<PaxosDescriptor>(4);
AcceptorAccept.checkAccept(request.getIid(), state, descriptors);
} else {
LOG.error("Got a resubmitted request or too new request. "
LOG.warn("Got a resubmitted request or too new request. "
+ "FirstDigestID: {} CurrentId: {} RequestId: {} FirstIid: {} MsgClient: {} MsgTS: {} CacheTS: {} ",
new Object[] { state.getFirstDigestId(), state.getCurrIid(), request.getIid(),
state.getFirstInstanceId(), clientId, timestamp, repTs });
return null;

return state.getIsLeader() ? Arrays.<PaxosDescriptor> asList(new Accept.Descriptor(requestIid),
new Accepted.Descriptor(requestIid)) : null;
}
}

Expand All @@ -92,6 +94,7 @@ public List<PaxosDescriptor> processMessage(Request message, PaxosState state) {
return null;
}

request.setIid(iid);
int bufSize = state.getInstanceBufferSize(iid);
state.setClientTimestampBufferElem(new IndexIid(bufSize, iid), ct);
bufSize++;
Expand Down

0 comments on commit 7dcefe5

Please sign in to comment.