Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve](txn insert) Txn load support cloud mode #34721

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cloud/src/common/bvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ BvarLatencyRecorderWithTag g_bvar_ms_commit_txn("ms", "commit_txn");
BvarLatencyRecorderWithTag g_bvar_ms_abort_txn("ms", "abort_txn");
BvarLatencyRecorderWithTag g_bvar_ms_get_txn("ms", "get_txn");
BvarLatencyRecorderWithTag g_bvar_ms_get_current_max_txn_id("ms", "get_current_max_txn_id");
BvarLatencyRecorderWithTag g_bvar_ms_begin_sub_txn("ms", "begin_sub_txn");
BvarLatencyRecorderWithTag g_bvar_ms_abort_sub_txn("ms", "abort_sub_txn");
BvarLatencyRecorderWithTag g_bvar_ms_check_txn_conflict("ms", "check_txn_conflict");
BvarLatencyRecorderWithTag g_bvar_ms_clean_txn_label("ms", "clean_txn_label");
BvarLatencyRecorderWithTag g_bvar_ms_get_version("ms", "get_version");
Expand Down
2 changes: 2 additions & 0 deletions cloud/src/common/bvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ extern BvarLatencyRecorderWithTag g_bvar_ms_abort_txn;
extern BvarLatencyRecorderWithTag g_bvar_ms_get_txn;
extern BvarLatencyRecorderWithTag g_bvar_ms_get_current_max_txn_id;
extern BvarLatencyRecorderWithTag g_bvar_ms_check_txn_conflict;
extern BvarLatencyRecorderWithTag g_bvar_ms_begin_sub_txn;
extern BvarLatencyRecorderWithTag g_bvar_ms_abort_sub_txn;
extern BvarLatencyRecorderWithTag g_bvar_ms_clean_txn_label;
extern BvarLatencyRecorderWithTag g_bvar_ms_get_version;
extern BvarLatencyRecorderWithTag g_bvar_ms_batch_get_version;
Expand Down
24 changes: 24 additions & 0 deletions cloud/src/meta-service/meta_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ class MetaServiceImpl : public cloud::MetaService {
void commit_txn(::google::protobuf::RpcController* controller, const CommitTxnRequest* request,
CommitTxnResponse* response, ::google::protobuf::Closure* done) override;

void commit_txn_with_sub_txn(::google::protobuf::RpcController* controller,
const CommitTxnRequest* request, CommitTxnResponse* response,
::google::protobuf::Closure* done);

void abort_txn(::google::protobuf::RpcController* controller, const AbortTxnRequest* request,
AbortTxnResponse* response, ::google::protobuf::Closure* done) override;

Expand All @@ -76,6 +80,14 @@ class MetaServiceImpl : public cloud::MetaService {
GetCurrentMaxTxnResponse* response,
::google::protobuf::Closure* done) override;

void begin_sub_txn(::google::protobuf::RpcController* controller,
const BeginSubTxnRequest* request, BeginSubTxnResponse* response,
::google::protobuf::Closure* done) override;

void abort_sub_txn(::google::protobuf::RpcController* controller,
const AbortSubTxnRequest* request, AbortSubTxnResponse* response,
::google::protobuf::Closure* done) override;

void check_txn_conflict(::google::protobuf::RpcController* controller,
const CheckTxnConflictRequest* request,
CheckTxnConflictResponse* response,
Expand Down Expand Up @@ -321,6 +333,18 @@ class MetaServiceProxy final : public MetaService {
call_impl(&cloud::MetaService::get_current_max_txn_id, controller, request, response, done);
}

void begin_sub_txn(::google::protobuf::RpcController* controller,
const BeginSubTxnRequest* request, BeginSubTxnResponse* response,
::google::protobuf::Closure* done) override {
call_impl(&cloud::MetaService::begin_sub_txn, controller, request, response, done);
}

void abort_sub_txn(::google::protobuf::RpcController* controller,
const AbortSubTxnRequest* request, AbortSubTxnResponse* response,
::google::protobuf::Closure* done) override {
call_impl(&cloud::MetaService::abort_sub_txn, controller, request, response, done);
}

void check_txn_conflict(::google::protobuf::RpcController* controller,
const CheckTxnConflictRequest* request,
CheckTxnConflictResponse* response,
Expand Down
Loading
Loading