[ https://issues.apache.org/jira/browse/KUDU-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17276141#comment-17276141 ]
ASF subversion and git services commented on KUDU-2612: ------------------------------------------------------- Commit 8c5e655d2d29e7758f26a373ea240631722ea1cf in kudu's branch refs/heads/master from Andrew Wong [ https://gitbox.apache.org/repos/asf?p=kudu.git;h=8c5e655 ] KUDU-2612: loosen restrictions for BEGIN_COMMIT ops This patch updates the state validations for the BEGIN_COMMIT. Rather than only requiring an in-flight transaction to be kOpen (the common case) or kCommitInProgress (if re-attempting a BEGIN_COMMIT call), it's more robust to allow the call to be made even after the transaction has already been finalized. This will allow a to-be-merged implementation of a commit task to be retried with much less fuss. Here's some pseudo-code for such a commit task: 1. persist COMMIT_IN_PROGRESS record on TxnStatusManager 2. foreach participant as p: BEGIN_COMMIT(p) 3. commit_ts = max timestamp used across BEGIN_COMMIT ops 4. foreach participant as p: FINALIZE_COMMIT(p, commit_ts) 5. persist COMMITTED record on TxnStatusManager If the commit task is interrupted (e.g. by some crash) between steps 3 and 5, we may be left with some participants with fully finalized commits. In such cases, all other participants _must_ also finalize, and they must finalize with the same timestamp. To ensure this, it must be possible to re-run a commit task. However, re-running it without this patch may lead to issues because the BEGIN_COMMIT ops would yield errors, complaining about an illegal state on participants that were finalized. This patch allows for a BEGIN_COMMIT op to succeed and return immediately if a FINALIZE_COMMIT op has already completed. If so, the finalized commit timestamp is sent back, allowing for the above commit task to be repeatable. Change-Id: Ifa4c5314190c84648c1b1edea7aab776b4882f97 Reviewed-on: http://gerrit.cloudera.org:8080/16992 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <aser...@cloudera.com> > Implement multi-row transactions > -------------------------------- > > Key: KUDU-2612 > URL: https://issues.apache.org/jira/browse/KUDU-2612 > Project: Kudu > Issue Type: Task > Reporter: Mike Percy > Priority: Major > Labels: roadmap-candidate > > Tracking Jira to implement multi-row / multi-table transactions in Kudu. -- This message was sent by Atlassian Jira (v8.3.4#803005)