Andrew Wong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16860 )
Change subject: KUDU-2612: allow participant ops to detect idempotent calls ...................................................................... KUDU-2612: allow participant ops to detect idempotent calls Previously, we could return TXN_ILLEGAL_STATE error if we tried to start a transaction but one was already present, we tried to begin committing but it the commit was already in progress, etc. However, it seems like it will be more robust behavior to be able to detect such cases, where the requested mutation is already applied. This patch does this by sending back a new TXN_OP_ALREADY_APPLIED error code for such calls. While it would be nice to return an OK response with the participant op, it seems non-trivial to exit out of an in-flight op with a success. Change-Id: If82d3d1aad6737dd4f9f234b122b8c15d65a6604 Reviewed-on: http://gerrit.cloudera.org:8080/16860 Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Kudu Jenkins --- M src/kudu/integration-tests/txn_participant-itest.cc M src/kudu/tablet/ops/participant_op.cc M src/kudu/tablet/ops/write_op.cc M src/kudu/tablet/ops/write_op.h M src/kudu/tablet/tablet_metadata.cc M src/kudu/tablet/tablet_metadata.h M src/kudu/tablet/txn_participant-test.cc M src/kudu/tablet/txn_participant.cc M src/kudu/tablet/txn_participant.h M src/kudu/tserver/tserver.proto 10 files changed, 217 insertions(+), 133 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/16860 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If82d3d1aad6737dd4f9f234b122b8c15d65a6604 Gerrit-Change-Number: 16860 Gerrit-PatchSet: 6 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)
