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 (#6).
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 which they host. Internally, the newly introduced logic
is mostly embedded into a new TxnOpDispatcher class. Every tablet
replica maintains a txn_id --> TxnOpDispatcher map, and here is the
lifecycle of an entry in that map:
* 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, the system automatically gets rid of no-longer-needed
TxnOpDispatcher entries.
This patch also contains several test scenarios to cover the newly
introduced functionality. I also updated other related tests to remove
artificial registration of corresponding transaction participants,
relying on newly introduced automatic registration of those.
WIP-ish:
* 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,558 insertions(+), 127 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/37/17037/6
--
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: 6
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)