kudu-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wong (Code Review)" <ger...@cloudera.org>
Subject [kudu-CR] KUDU-2612 p2: introduce transaction status management
Date Tue, 30 Jun 2020 19:10:18 GMT
Hello Tidy Bot, Alexey Serbin, Attila Bukor, Kudu Jenkins, 

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

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

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

Change subject: KUDU-2612 p2: introduce transaction status management
......................................................................

KUDU-2612 p2: introduce transaction status management

This introduces the TxnStatusManager, which is backed by the
TxnStatusTablet that exposes the following APIs that will be called via
RPC, and will serve as many of the building blocks for orchestrating
two-phase commit:
- BeginTransaction: adds a new transaction under management of the
  TxnStatusManager
- BeginCommitTransaction: transitions the state of a transaction from
  OPEN to COMMIT_IN_PROGRESS
- AbortTransaction: transitions the state of a transaction from OPEN or
  COMMIT_IN_PROGRESS to ABORTED
- RegisterParticipant: adds a participant to be associated with a
  specific transaction ID

For completeness sake w.r.t defining the transaction state's enums, the
following API is also added, which will be called by the
TxnStatusManager itself upon determining a transaction has been
completed.
- FinalizeCommitTransaction: transitions the state of a transaction from
  COMMIT_IN_PROGRESS to COMMITTED

This new abstraction mirrors that used by the CatalogManager, which uses
copy-on-write locking to protect concurrent access to metadata while
writes to the underlying TabletReplica (i.e. SysCatalogTable, or in this
case, TxnStatusTablet) are being replicated.

This is at least enough of a jumping off point that we can begin
plumbing this into the tablet servers and defining an RPC service around
it -- there are still no facilities to create a TxnStatusManager.

It should be noted that end-users will not call these methods directly,
but rather through some layer of indirection (e.g. clients won't request
a specific transaction ID, they'll just request to begin a transaction,
and some intermediary layer will be in charge of getting an appropriate
transaction ID). This should give us flexibility in changing the
TxnStatusManager's interface moving forward.

Change-Id: I371bb200cf65073ae3ac7cb311ab9a0b8344a636
---
M src/kudu/master/catalog_manager.h
M src/kudu/transactions/CMakeLists.txt
A src/kudu/transactions/txn_status_entry.cc
A src/kudu/transactions/txn_status_entry.h
A src/kudu/transactions/txn_status_manager-test.cc
A src/kudu/transactions/txn_status_manager.cc
A src/kudu/transactions/txn_status_manager.h
M src/kudu/util/cow_object.h
8 files changed, 1,059 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/44/16044/6
-- 
To view, visit http://gerrit.cloudera.org:8080/16044
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I371bb200cf65073ae3ac7cb311ab9a0b8344a636
Gerrit-Change-Number: 16044
Gerrit-PatchSet: 6
Gerrit-Owner: Andrew Wong <awong@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aserbin@cloudera.com>
Gerrit-Reviewer: Andrew Wong <awong@cloudera.com>
Gerrit-Reviewer: Attila Bukor <abukor@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message