Andrew Wong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/16831
Change subject: txn_participant: return TXN_ILLEGAL_STATE code on illegal state errors ...................................................................... txn_participant: return TXN_ILLEGAL_STATE code on illegal state errors I have a patch coming up that sends RPCs that submit participant ops to the TxnParticipant and retries if necessary. One of the criteria to retry an RPC is checking if the Raft application returned an IllegalState error, e.g. in RaftConsensus::CheckLeadershipAndBindTerm. This is problematic, as TxnParticipants may also return IllegalState if the transaction is not in an appropriate state (e.g. an RPC tries to abort an already-committed transaction). To disambiguate such cases, this patch updates the TxnParticipants to also set a TabletServerErrorPB code when such an error occurs, allowing for more specific error handling to be determined. Change-Id: Ibfb8400666855c694b78b1425b1c121597ec7ccf --- M src/kudu/integration-tests/txn_participant-itest.cc M src/kudu/tablet/ops/participant_op.cc M src/kudu/tablet/ops/participant_op.h M src/kudu/tablet/txn_participant-test.cc M src/kudu/tablet/txn_participant.h 5 files changed, 157 insertions(+), 88 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/31/16831/1 -- To view, visit http://gerrit.cloudera.org:8080/16831 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfb8400666855c694b78b1425b1c121597ec7ccf Gerrit-Change-Number: 16831 Gerrit-PatchSet: 1 Gerrit-Owner: Andrew Wong <[email protected]>
