Andrew Wong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16194 )
Change subject: KUDU-2612 p6: add coordination calls to system client ...................................................................... KUDU-2612 p6: add coordination calls to system client This adds the following calls to the TxnSystemClient: - BeginTransaction() - RegisterParticipant() whose APIs roughly match those of the TxnStatusManager. For the sake of a more focused patch, I only added these couple to build out reusable pieces of the system client. Later patches will extend the client with BeginCommitTransaction() and AbortTransaction() calls. All of these calls share the same RPC-sending code, which draws loose inspiration from the client::Batcher. I considered templatizing/reusing the Batcher, but eventually opted not to for several reasons: - We don't need all the bells and whistles attached to the Batcher, e.g. timestamp tracking and consistency modes, session-based API, etc. - The complexity of abstracting the Batcher to the point of using it for other RPC types would have made the code very unwieldy and difficult to maintain and extend. - Not reusing the Batcher gives us an opportunity moving forward to consider other approaches to batching (e.g. batching by server rather than by tablet ID). Where the implementation draws inspiration from the Batcher is its usage of the MetaCache to attach callbacks to tablet lookups, its retry-handling, and its memory management -- namely, each request is encapsulated in such a way that the memory used to track the call automatically frees itself upon completion. Change-Id: I4126cb3dcf379b397f84578c2265dca3ece3d98c Reviewed-on: http://gerrit.cloudera.org:8080/16194 Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Andrew Wong <[email protected]> --- M src/kudu/client/client.h M src/kudu/client/meta_cache.cc M src/kudu/client/meta_cache.h M src/kudu/integration-tests/auth_token_expire-itest.cc M src/kudu/integration-tests/client-negotiation-failover-itest.cc M src/kudu/integration-tests/ts_tablet_manager-itest.cc M src/kudu/integration-tests/txn_status_table-itest.cc M src/kudu/tablet/ops/op.h M src/kudu/tablet/txn_coordinator.h M src/kudu/transactions/CMakeLists.txt A src/kudu/transactions/coordinator_rpc.cc A src/kudu/transactions/coordinator_rpc.h 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-test.cc M src/kudu/transactions/txn_status_tablet.cc M src/kudu/transactions/txn_status_tablet.h M src/kudu/transactions/txn_system_client.cc M src/kudu/transactions/txn_system_client.h M src/kudu/tserver/tablet_service.cc 21 files changed, 972 insertions(+), 135 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved Andrew Wong: Verified -- To view, visit http://gerrit.cloudera.org:8080/16194 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4126cb3dcf379b397f84578c2265dca3ece3d98c Gerrit-Change-Number: 16194 Gerrit-PatchSet: 11 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)
