Andrew Wong has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/16116 )

Change subject: KUDU-2612 p3: tserver mechanism to create txn status tablets
......................................................................

KUDU-2612 p3: tserver mechanism to create txn status tablets

This introduces the concept of a table type in tablets. This is used in
the context of creating transaction status table partitions; if a tablet
replica is created as a partition of a transaction status table, the
underlying replica will initialize some state to manage and coordinate
transactions -- namely, a TxnStatusManager.

For the sake of decoupling submodules, to get a TabletReplica to
initialize a TxnStatusManager, this patch introduces the
tablet::TxnCoordinator and tablet::TxnCoordinatorFactory interfaces that
TxnStatusManager and the new TxnStatusManagerFactory implement
respectively. The TxnStatusManagerFactory can be created by members of
the tserver and passed to TabletReplicas upon initialization -- this
layer of indirection will allow us to use tserver-wide state (e.g. in
the future, a system client) without muddying the tablet subdirectory
too much.

This approach lies in contrast to the approach used for the
CatalogManager, in which the master server owns a CatalogManager that
owns the underlying SysCatalogTable and TabletReplica. I went down this
route because unlike the CatalogManager replicas, I expect the replicas
of TxnStatusTablets to be dynamically moved around, and so it behooves
us to reuse as much of the existing tserver replica management code as
possible. To that end, the ownership relationship between management
state and underyling tablet replica is flipped, with the TabletReplica
owning the TxnStatusManager.

The plumbing only extends through the tablet servers -- the ability to
create transaction status tables and define partitioning is not yet
plumbed into the master. Additionally, there is still currently no means
to restrict calls to the TxnStatusManagers whose underlying replicas are
running leaders -- that will also come in later patches.

Change-Id: Ib429f055e12944fa930f3e95ec4f2504466d3d02
Reviewed-on: http://gerrit.cloudera.org:8080/16116
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <[email protected]>
---
M src/kudu/common/common.proto
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/tablet-harness.h
M src/kudu/tablet/tablet_bootstrap-test.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tablet/tablet_replica-test-base.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
A src/kudu/tablet/txn_coordinator.h
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/transactions/CMakeLists.txt
M src/kudu/transactions/txn_status_manager-test.cc
M src/kudu/transactions/txn_status_manager.cc
M src/kudu/transactions/txn_status_manager.h
M src/kudu/transactions/txn_status_tablet.cc
M src/kudu/transactions/txn_status_tablet.h
M src/kudu/tserver/CMakeLists.txt
M src/kudu/tserver/mini_tablet_server.cc
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_server-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/ts_tablet_manager-test.cc
M src/kudu/tserver/ts_tablet_manager.cc
M src/kudu/tserver/ts_tablet_manager.h
M src/kudu/tserver/tserver_admin.proto
29 files changed, 442 insertions(+), 57 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Alexey Serbin: Looks good to me, approved

--
To view, visit http://gerrit.cloudera.org:8080/16116
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib429f055e12944fa930f3e95ec4f2504466d3d02
Gerrit-Change-Number: 16116
Gerrit-PatchSet: 5
Gerrit-Owner: Andrew Wong <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to