diff --git a/replication/ir/client.cc b/replication/ir/client.cc index 80d31968ac4ad1c7076383113b12380a6a69e18f..c5c39a53b32d66795bd0f87f4414f11ea55b926d 100644 --- a/replication/ir/client.cc +++ b/replication/ir/client.cc @@ -232,7 +232,7 @@ IRClient::ConsensusSlowPath() string result = pendingConsensusRequest->decide(results); // Put the result in the request to store for later retries - pendingConsensusRequest->request = result; + pendingConsensusRequest->decideReq = result; // Send finalize message proto::FinalizeConsensusMessage response; @@ -258,7 +258,7 @@ IRClient::ResendConfirmation() proto::FinalizeConsensusMessage response; response.mutable_opid()->set_clientid(clientid); response.mutable_opid()->set_clientreqid(pendingConsensusRequest->clientReqId); - response.set_result(pendingConsensusRequest->request); + response.set_result(pendingConsensusRequest->decideReq); if(transport->SendMessageToAll(this, response)) { confirmationTimeout->Reset(); @@ -419,7 +419,7 @@ IRClient::HandleConfirm(const TransportAddress &remote, pendingConsensusRequest = NULL; // Return to client - req->continuation(req->request, pendingConsensusRequest->request); + req->continuation(req->request, req->decideReq); delete req; } } diff --git a/replication/ir/client.h b/replication/ir/client.h index 77d18fc4c8892849fc791d61fe1906f1e7289656..dfe863d7fef2c1b8cc0e626721d9292523b26af5 100644 --- a/replication/ir/client.h +++ b/replication/ir/client.h @@ -77,6 +77,7 @@ protected: struct PendingRequest { string request; + string decideReq; uint64_t clientReqId; decide_t decide; continuation_t continuation; diff --git a/store/tapirstore/client.cc b/store/tapirstore/client.cc index cab1d9caddee79f31227888963fb8a622cbd589d..8430d0adf77407cdd2138bfeddcf9d79ab1d0875 100644 --- a/store/tapirstore/client.cc +++ b/store/tapirstore/client.cc @@ -166,24 +166,27 @@ Client::Prepare(Timestamp ×tamp) uint64_t proposed = p->GetTimestamp().getTimestamp(); switch(p->GetReply()) { - case REPLY_OK: - Debug("Prepare ok vote"); - continue; - case REPLY_FAIL: - // abort! - Debug("ABORT transaction"); - return REPLY_FAIL; - case REPLY_RETRY: - status = REPLY_RETRY; + case REPLY_OK: + Debug("Prepare ok vote"); + continue; + case REPLY_FAIL: + // abort! + Debug("ABORT transaction"); + return REPLY_FAIL; + case REPLY_RETRY: + status = REPLY_RETRY; if (proposed > ts) { ts = proposed; } break; - case REPLY_TIMEOUT: - status = REPLY_RETRY; - break; - default: - NOT_IMPLEMENTED(); + case REPLY_TIMEOUT: + status = REPLY_RETRY; + break; + case REPLY_ABSTAIN: + // just ignore abstains + break; + default: + break; } delete p; }