You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2021/02/16 19:08:31 UTC

[kudu-CR] KUDU-2612 tablet servers automatically register txn participants

Hello Tidy Bot, Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17037

to look at the new patch set (#4).

Change subject: KUDU-2612 tablet servers automatically register txn participants
......................................................................

KUDU-2612 tablet servers automatically register txn participants

With this patch, tablet servers automatically register tablets as
transaction participants and automatically issue BEGIN_TXN operation
for the replica upon receiving write operations targeting
tablet replicas they host.

This patch also contains several test scenarios to cover the newly
introduced functionality.

Here is an TxnOpDispatcher entry lifecycle:
  * An entry is added upon receiving write request in the context
    of a multi-row transaction.
  * An entry is removed upon applying either ParticipantOpPB::ABORT_TXN
    or ParticipantOpPB::FINALIZE_COMMIT operation.
  * If a write request is received after transaction has been committed
    or aborted, the entry is automatically removed once receiving
    corresponding error response from any of the following components:
      ** from TxnStatusManager in at attempts to register a participant
         in the context of committed/aborted transaction
      ** from the replica itself in an attempt to add
         ParticipantOpPB::BEGIN_COMMIT operation
In other words, TxnOpDispatcher entries are automatically cleaned up
and do not require any extra task.

WIP-ish:
  * address TODO to TxnOpDispatcher::Submit() addressing ownership
    transfer on WriteOpState back to the code when
    TabletReplica::SubmitWrite() returns non-OK status
  * add more tests

Change-Id: Ia383f7afd208c44695c57aab82e3818fa1712ce6
---
M src/kudu/client/batcher.cc
M src/kudu/client/client-test.cc
M src/kudu/integration-tests/CMakeLists.txt
M src/kudu/integration-tests/fuzz-itest.cc
M src/kudu/integration-tests/txn_commit-itest.cc
A src/kudu/integration-tests/txn_write_ops-itest.cc
M src/kudu/tablet/ops/participant_op.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/ts_tablet_manager.cc
M src/kudu/tserver/ts_tablet_manager.h
12 files changed, 1,548 insertions(+), 126 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/17037/4
-- 
To view, visit http://gerrit.cloudera.org:8080/17037
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia383f7afd208c44695c57aab82e3818fa1712ce6
Gerrit-Change-Number: 17037
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)