Skip to content

Commit 44e3ae2

Browse files
authored
[fix](binlog) Track committed TSO and fence uncertain commits for bounded incremental reads (#67820)
### What problem does this PR solve? Issue Number: None Related PR: #67181, #67594 Problem Summary: Bounded cloud `@incr` reads need a safe end timestamp. Waiting by transaction ID can include transactions outside the requested time window, while one slow transaction can hold a global committed prefix and block unrelated tables. FE failover also needs to prevent an old master or an uncertain commit RPC from later committing a TSO that FE has already treated as finished. This PR introduces a durable committed TSO and keeps the active commit-attempt set in the FE master: - Allocate and register a commit TSO immediately before the first Meta Service commit RPC, under the TSO allocator lock. Retries after a fenced response replace the registration with a fresh TSO above the returned fence. - On an explicit success, already-visible result or already-aborted result, remove the transaction registration. On another explicit failure, remove only the exact attempted TSO. - On `KV_TXN_MAYBE_COMMITTED`, an RPC timeout, connection loss or another uncertain result, synchronously advance the per-instance Meta Service fence to the attempted TSO before removing it. If fencing fails, deactivate the TSO service so reads and allocations cannot use an unsafe prefix. - Disable transport-level retries for commits carrying a positive TSO. `MS_TOO_BUSY` remains retryable because Meta Service explicitly rejects it before processing. Non-TSO transactions keep the existing retry behavior. - Derive the committed TSO from the current allocated TSO and the oldest registered attempt, and persist it together with the allocation-window end in one BDB journal record. The default persistence window is reduced from five seconds to one second. - Remove the startup transaction scan, recovery RPC, recovery state, and periodic `checkTransactions()`. A new master persists a fresh window and advances the same global fence before enabling TSO service, so commits using an older TSO are rejected without waiting for PREPARED transactions. - A successful lazy commit can be released from FE memory. Incremental scans ask Meta Service to wait for pending transactions on the selected partitions before fixing their visible versions, preserving readability without a global recovery list. For a strongly consistent cloud read with an explicit end on every incremental relation, FE applies these rules: | Requested end | Behavior | | --- | --- | | After the current TSO physical time | Return `5100 / ERR_INCR_WINDOW_NOT_READY` immediately. | | At or before the durable committed TSO physical time | Admit the window directly. | | Between committed and current TSO physical times | Wait only for the captured FE registrations whose TSO is within the window and whose tables are queried. Return `5101 / ERR_INCR_VISIBLE_WAIT_TIMEOUT` when the wait expires. | After admission, version resolution waits only for pending transactions on the selected partitions. Unrelated tables do not participate in either wait. `information_schema.tso_status` exposes `COMMITTED_TSO` and `COMMITTED_TSO_PHYSICAL_TIME`; the latter is epoch milliseconds and is the maximum globally admitted end timestamp. The existing current TSO and allocation-window columns remain available. The Meta Service fence is one monotonic, non-versioned current-state key in the instance transaction namespace. Commit reads it in the same FDB transaction as the metadata commit and rejects `commit_tso <= fence` with `TXN_COMMIT_TSO_EXPIRED`, returning the effective fence. The check runs only when both the FE request flag and the mutable Meta Service configuration are enabled. Cloud snapshot, clone and rollback do not restore this leadership/commit fence; a restored or cloned instance publishes its current fence when its FE master initializes. Upgrade Meta Service before FE. A missing or unavailable fence RPC keeps a new FE TSO service uninitialized. The new Meta Service error code uses `actual_code` while old clients receive the compatible fallback code. #### Connector error handling | Code | Name | Meaning | Connector action | | --- | --- | --- | --- | | 5100 | `ERR_INCR_WINDOW_NOT_READY` | The requested end is after current TSO, or the FE master/TSO generation changed while establishing the window. | Retry the same end timestamp after `retryAfterMs`; do not advance the incremental offset. Route a retry through the current master when the reason is `TSO_MASTER_CHANGED`. | | 5101 | `ERR_INCR_VISIBLE_WAIT_TIMEOUT` | Relevant commit attempts did not finish within `change_visible_timeout_ms`. | Retry the same end timestamp; do not advance the incremental offset. | MySQL returns SQLSTATE `HY000`; the message contains `reason`, requested end, current TSO, committed TSO, their physical times, timeout and retry delay. Arrow Flight SQL returns `UNAVAILABLE` only for these two errors and includes `doris-error-code` and `doris-error-name` metadata. Other Flight failures retain the original `INTERNAL` wrapping. ### Release note Improve bounded, strongly consistent cloud incremental reads with a durable committed TSO, table-scoped waits and per-instance commit TSO fencing. Expose the committed TSO through `information_schema.tso_status`, distinguish an unavailable window (5100) from a visibility wait timeout (5101), and remove FE startup/periodic transaction recovery scans. Upgrade Meta Service before FE. ### Check List (For Author) - Test - [x] FE unit tests for TSO service/tracker, commit-result handling, Meta Service retry behavior, incremental version waits, MySQL error propagation and Arrow Flight SQL error mapping. - [x] Cloud ASAN unit tests for fence monotonicity and stale-commit rejection, fence-key encoding, and response-code compatibility. - [x] Regression tests `test_committed_tso` and `test_binlog_changes_syntax` passed earlier in this PR with outputs generated by the standard runner. - [x] `./build.sh -j32` and `./build.sh --cloud -j32`. - [x] clang-format 16, check-format, Cloud clang-tidy and build-hygiene checks. - Behavior changed: Yes. Bounded cloud reads use committed TSO/table-scoped waits; uncertain TSO commit attempts are fenced before release; FE no longer scans transactions during startup or periodically. - Does this need documentation: Yes. Connector-facing error handling is documented above.
1 parent 0988943 commit 44e3ae2

54 files changed

Lines changed: 2694 additions & 166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎be/src/information_schema/schema_tso_status_scanner.cpp‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ std::vector<SchemaScanner::ColumnDesc> SchemaTsoStatusScanner::_s_tso_status_col
3434
{"CURRENT_TSO", TYPE_BIGINT, sizeof(int64_t), true},
3535
{"CURRENT_TSO_PHYSICAL_TIME", TYPE_BIGINT, sizeof(int64_t), true},
3636
{"CURRENT_TSO_LOGICAL_COUNTER", TYPE_BIGINT, sizeof(int64_t), true},
37+
{.name = "COMMITTED_TSO", .type = TYPE_BIGINT, .size = sizeof(int64_t), .is_null = true},
38+
{.name = "COMMITTED_TSO_PHYSICAL_TIME",
39+
.type = TYPE_BIGINT,
40+
.size = sizeof(int64_t),
41+
.is_null = true},
3742
};
3843

3944
SchemaTsoStatusScanner::SchemaTsoStatusScanner()
@@ -51,6 +56,11 @@ Status SchemaTsoStatusScanner::_get_tso_status_block_from_fe() {
5156
TNetworkAddress master_addr = ExecEnv::GetInstance()->cluster_info()->master_fe_addr;
5257

5358
TSchemaTableRequestParams schema_table_request_params;
59+
std::vector<std::string> columns;
60+
for (const auto& column : _s_tso_status_columns) {
61+
columns.emplace_back(column.name);
62+
}
63+
schema_table_request_params.__set_columns_name(columns);
5464
TFetchSchemaTableDataRequest request;
5565
request.__set_schema_table_name(TSchemaTableName::TSO_STATUS);
5666
request.__set_schema_table_params(schema_table_request_params);

‎be/test/exec/schema_scanner/schema_tso_status_scanner_test.cpp‎

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
namespace doris {
3838
namespace {
3939

40-
TRow create_tso_status_row(const std::array<int64_t, 4>& values) {
40+
TRow create_tso_status_row(const std::array<int64_t, 6>& values) {
4141
std::vector<TCell> cells;
4242
cells.reserve(values.size());
4343
for (int64_t value : values) {
@@ -65,7 +65,7 @@ std::unique_ptr<Block> create_output_block(SchemaTsoStatusScanner* scanner) {
6565
}
6666

6767
void expect_tso_status_row(const Block& block, size_t row_idx,
68-
const std::array<int64_t, 4>& expected) {
68+
const std::array<int64_t, 6>& expected) {
6969
ASSERT_EQ(expected.size(), block.columns());
7070
for (size_t column_idx = 0; column_idx < expected.size(); ++column_idx) {
7171
const auto& column = block.get_by_position(column_idx).column;
@@ -80,11 +80,13 @@ TEST(SchemaTsoStatusScannerTest, test_create_tso_status_scanner) {
8080
auto scanner = SchemaScanner::create(TSchemaTableType::SCH_TSO_STATUS);
8181
ASSERT_NE(nullptr, scanner);
8282
EXPECT_EQ(TSchemaTableType::SCH_TSO_STATUS, scanner->type());
83-
ASSERT_EQ(4, scanner->get_column_desc().size());
83+
ASSERT_EQ(6, scanner->get_column_desc().size());
8484
EXPECT_STREQ("WINDOW_END_PHYSICAL_TIME", scanner->get_column_desc()[0].name);
8585
EXPECT_STREQ("CURRENT_TSO", scanner->get_column_desc()[1].name);
8686
EXPECT_STREQ("CURRENT_TSO_PHYSICAL_TIME", scanner->get_column_desc()[2].name);
8787
EXPECT_STREQ("CURRENT_TSO_LOGICAL_COUNTER", scanner->get_column_desc()[3].name);
88+
EXPECT_STREQ("COMMITTED_TSO", scanner->get_column_desc()[4].name);
89+
EXPECT_STREQ("COMMITTED_TSO_PHYSICAL_TIME", scanner->get_column_desc()[5].name);
8890
for (const auto& column : scanner->get_column_desc()) {
8991
EXPECT_EQ(TYPE_BIGINT, column.type);
9092
EXPECT_TRUE(column.is_null);
@@ -140,16 +142,16 @@ TEST(SchemaTsoStatusScannerTest, test_process_tso_status_result_error) {
140142
}
141143

142144
TEST(SchemaTsoStatusScannerTest, test_process_tso_status_result) {
143-
const std::array<int64_t, 4> first_row = {1000, 2000, 3000, 4000};
144-
const std::array<int64_t, 4> second_row = {1001, 2001, 3001, 4001};
145+
const std::array<int64_t, 6> first_row = {1000, 2000, 3000, 4000};
146+
const std::array<int64_t, 6> second_row = {1001, 2001, 3001, 4001};
145147
auto result = create_tso_status_result(
146148
{create_tso_status_row(first_row), create_tso_status_row(second_row)});
147149

148150
SchemaTsoStatusScanner scanner;
149151
ASSERT_TRUE(scanner._process_tso_status_result(result).ok());
150152

151153
ASSERT_NE(nullptr, scanner._tso_status_block);
152-
EXPECT_EQ(4, scanner._tso_status_block->columns());
154+
EXPECT_EQ(6, scanner._tso_status_block->columns());
153155
EXPECT_EQ(2, scanner._tso_status_block->rows());
154156
EXPECT_EQ(2, scanner._total_rows);
155157
expect_tso_status_row(*scanner._tso_status_block, 0, first_row);
@@ -158,7 +160,8 @@ TEST(SchemaTsoStatusScannerTest, test_process_tso_status_result) {
158160

159161
TEST(SchemaTsoStatusScannerTest, test_process_tso_status_result_schema_mismatch) {
160162
TRow invalid_row = create_tso_status_row({1000, 2000, 3000, 4000});
161-
invalid_row.column_value.pop_back();
163+
invalid_row.column_value.resize(
164+
4); // Response from an older FE cannot provide a committed prefix.
162165
auto result = create_tso_status_result({invalid_row});
163166

164167
SchemaTsoStatusScanner scanner;
@@ -170,6 +173,17 @@ TEST(SchemaTsoStatusScannerTest, test_process_tso_status_result_schema_mismatch)
170173
EXPECT_EQ(0, scanner._total_rows);
171174
}
172175

176+
TEST(SchemaTsoStatusScannerTest, test_unknown_committed_tso_is_null) {
177+
TRow row = create_tso_status_row({1000, 2000, 3000, 4000, 0, 0});
178+
row.column_value[4].__set_isNull(true);
179+
row.column_value[5].__set_isNull(true);
180+
SchemaTsoStatusScanner scanner;
181+
ASSERT_TRUE(scanner._process_tso_status_result(create_tso_status_result({row})).ok());
182+
EXPECT_FALSE(scanner._tso_status_block->get_by_position(3).column->is_null_at(0));
183+
EXPECT_TRUE(scanner._tso_status_block->get_by_position(4).column->is_null_at(0));
184+
EXPECT_TRUE(scanner._tso_status_block->get_by_position(5).column->is_null_at(0));
185+
}
186+
173187
TEST(SchemaTsoStatusScannerTest, test_get_next_block_empty_result) {
174188
MockRuntimeState state;
175189
SchemaScannerParam param;
@@ -188,9 +202,9 @@ TEST(SchemaTsoStatusScannerTest, test_get_next_block_empty_result) {
188202
}
189203

190204
TEST(SchemaTsoStatusScannerTest, test_get_next_block_in_batches) {
191-
const std::array<int64_t, 4> first_row = {1000, 2000, 3000, 4000};
192-
const std::array<int64_t, 4> second_row = {1001, 2001, 3001, 4001};
193-
const std::array<int64_t, 4> third_row = {1002, 2002, 3002, 4002};
205+
const std::array<int64_t, 6> first_row = {1000, 2000, 3000, 4000};
206+
const std::array<int64_t, 6> second_row = {1001, 2001, 3001, 4001};
207+
const std::array<int64_t, 6> third_row = {1002, 2002, 3002, 4002};
194208

195209
MockRuntimeState state;
196210
state._batch_size = 2;

‎cloud/src/common/bvars.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ BvarLatencyRecorderWithTag g_bvar_ms_create_meta_sync_point("ms", "create_meta_s
4343
BvarLatencyRecorderWithTag g_bvar_ms_begin_sub_txn("ms", "begin_sub_txn");
4444
BvarLatencyRecorderWithTag g_bvar_ms_abort_sub_txn("ms", "abort_sub_txn");
4545
BvarLatencyRecorderWithTag g_bvar_ms_check_txn_conflict("ms", "check_txn_conflict");
46+
BvarLatencyRecorderWithTag g_bvar_ms_advance_tso_fence("ms", "advance_tso_fence");
4647
BvarLatencyRecorderWithTag g_bvar_ms_abort_txn_with_coordinator("ms", "abort_txn_with_coordinator");
4748
BvarLatencyRecorderWithTag g_bvar_ms_get_prepare_txn_by_coordinator("ms", "get_prepare_txn_by_coordinator");
4849
BvarLatencyRecorderWithTag g_bvar_ms_clean_txn_label("ms", "clean_txn_label");
@@ -501,6 +502,8 @@ mBvarInt64Adder g_bvar_rpc_kv_abort_txn_with_coordinator_get_counter("rpc_kv_abo
501502
mBvarInt64Adder g_bvar_rpc_kv_get_prepare_txn_by_coordinator_get_counter("rpc_kv_get_prepare_txn_by_coordinator_get_counter",{"instance_id"});
502503
// check_txn_conflict
503504
mBvarInt64Adder g_bvar_rpc_kv_check_txn_conflict_get_counter("rpc_kv_check_txn_conflict_get_counter",{"instance_id"});
505+
mBvarInt64Adder g_bvar_rpc_kv_advance_tso_fence_get_counter("rpc_kv_advance_tso_fence_get_counter",{"instance_id"});
506+
mBvarInt64Adder g_bvar_rpc_kv_advance_tso_fence_put_counter("rpc_kv_advance_tso_fence_put_counter",{"instance_id"});
504507
// clean_txn_label
505508
mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_get_counter("rpc_kv_clean_txn_label_get_counter",{"instance_id"});
506509
mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_put_counter("rpc_kv_clean_txn_label_put_counter",{"instance_id"});
@@ -711,6 +714,8 @@ mBvarInt64Adder g_bvar_rpc_kv_abort_txn_with_coordinator_get_bytes("rpc_kv_abort
711714
mBvarInt64Adder g_bvar_rpc_kv_get_prepare_txn_by_coordinator_get_bytes("rpc_kv_get_prepare_txn_by_coordinator_get_bytes",{"instance_id"});
712715
// check_txn_conflict
713716
mBvarInt64Adder g_bvar_rpc_kv_check_txn_conflict_get_bytes("rpc_kv_check_txn_conflict_get_bytes",{"instance_id"});
717+
mBvarInt64Adder g_bvar_rpc_kv_advance_tso_fence_get_bytes("rpc_kv_advance_tso_fence_get_bytes",{"instance_id"});
718+
mBvarInt64Adder g_bvar_rpc_kv_advance_tso_fence_put_bytes("rpc_kv_advance_tso_fence_put_bytes",{"instance_id"});
714719
// clean_txn_label
715720
mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_get_bytes("rpc_kv_clean_txn_label_get_bytes",{"instance_id"});
716721
mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_put_bytes("rpc_kv_clean_txn_label_put_bytes",{"instance_id"});

‎cloud/src/common/bvars.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ extern BvarLatencyRecorderWithTag g_bvar_ms_get_txn;
553553
extern BvarLatencyRecorderWithTag g_bvar_ms_get_current_max_txn_id;
554554
extern BvarLatencyRecorderWithTag g_bvar_ms_create_meta_sync_point;
555555
extern BvarLatencyRecorderWithTag g_bvar_ms_check_txn_conflict;
556+
extern BvarLatencyRecorderWithTag g_bvar_ms_advance_tso_fence;
556557
extern BvarLatencyRecorderWithTag g_bvar_ms_abort_txn_with_coordinator;
557558
extern BvarLatencyRecorderWithTag g_bvar_ms_get_prepare_txn_by_coordinator;
558559
extern BvarLatencyRecorderWithTag g_bvar_ms_begin_sub_txn;
@@ -908,6 +909,8 @@ extern mBvarInt64Adder g_bvar_rpc_kv_abort_sub_txn_put_counter;
908909
extern mBvarInt64Adder g_bvar_rpc_kv_abort_txn_with_coordinator_get_counter;
909910
extern mBvarInt64Adder g_bvar_rpc_kv_get_prepare_txn_by_coordinator_get_counter;
910911
extern mBvarInt64Adder g_bvar_rpc_kv_check_txn_conflict_get_counter;
912+
extern mBvarInt64Adder g_bvar_rpc_kv_advance_tso_fence_get_counter;
913+
extern mBvarInt64Adder g_bvar_rpc_kv_advance_tso_fence_put_counter;
911914
extern mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_get_counter;
912915
extern mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_put_counter;
913916
extern mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_del_counter;
@@ -1051,6 +1054,8 @@ extern mBvarInt64Adder g_bvar_rpc_kv_abort_sub_txn_put_bytes;
10511054
extern mBvarInt64Adder g_bvar_rpc_kv_abort_txn_with_coordinator_get_bytes;
10521055
extern mBvarInt64Adder g_bvar_rpc_kv_get_prepare_txn_by_coordinator_get_bytes;
10531056
extern mBvarInt64Adder g_bvar_rpc_kv_check_txn_conflict_get_bytes;
1057+
extern mBvarInt64Adder g_bvar_rpc_kv_advance_tso_fence_get_bytes;
1058+
extern mBvarInt64Adder g_bvar_rpc_kv_advance_tso_fence_put_bytes;
10541059
extern mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_get_bytes;
10551060
extern mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_put_bytes;
10561061
extern mBvarInt64Adder g_bvar_rpc_kv_clean_txn_label_del_bytes;

‎cloud/src/common/config.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ CONF_mInt64(max_txn_commit_byte, "7340032");
354354
CONF_mBool(enable_get_prepare_txn_by_coordinator_by_running_key, "true");
355355

356356
CONF_Bool(enable_cloud_txn_lazy_commit, "true");
357+
CONF_mBool(enable_check_commit_tso_fence, "true");
357358
CONF_Int32(txn_lazy_commit_rowsets_thresold, "1000");
358359
CONF_Int32(txn_lazy_commit_num_threads, "8");
359360
CONF_mBool(enable_cloud_parallel_txn_lazy_commit, "true");

‎cloud/src/meta-service/http_encode_key.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ static std::unordered_map<std::string_view,
250250
{"TxnInfoKey", {{"instance_id", "db_id", "txn_id"}, [](param_type& p) { return txn_info_key(KeyInfoSetter<TxnInfoKeyInfo>{p}.get()); }, parse<TxnInfoPB> , parse_json<TxnInfoPB>}},
251251
{"TxnIndexKey", {{"instance_id", "txn_id"}, [](param_type& p) { return txn_index_key(KeyInfoSetter<TxnIndexKeyInfo>{p}.get()); }, parse<TxnIndexPB> , parse_json<TxnIndexPB>}},
252252
{"TxnRunningKey", {{"instance_id", "db_id", "txn_id"}, [](param_type& p) { return txn_running_key(KeyInfoSetter<TxnRunningKeyInfo>{p}.get()); }, parse<TxnRunningPB> , parse_json<TxnRunningPB>}},
253+
{"TxnTsoFenceKey", {{"instance_id"}, [](param_type& p) { return txn_tso_fence_key(KeyInfoSetter<TxnTsoFenceKeyInfo>{p}.get()); }, parse<TxnTsoFencePB> , parse_json<TxnTsoFencePB>}},
253254
{"PartitionVersionKey", {{"instance_id", "db_id", "tbl_id", "partition_id"}, [](param_type& p) { return partition_version_key(KeyInfoSetter<PartitionVersionKeyInfo>{p}.get()); }, parse<VersionPB> , parse_json<VersionPB>}},
254255
{"TableVersionKey", {{"instance_id", "db_id", "tbl_id"}, [](param_type& p) { return table_version_key(KeyInfoSetter<TableVersionKeyInfo>{p}.get()); }, parse<VersionPB> , parse_json<VersionPB>}},
255256
{"MetaRowsetKey", {{"instance_id", "tablet_id", "version"}, [](param_type& p) { return meta_rowset_key(KeyInfoSetter<MetaRowsetKeyInfo>{p}.get()); }, parse<doris::RowsetMetaCloudPB> , parse_json<doris::RowsetMetaCloudPB>}},

‎cloud/src/meta-service/meta_service.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ class MetaServiceImpl : public cloud::MetaService {
145145
CheckTxnConflictResponse* response,
146146
::google::protobuf::Closure* done) override;
147147

148+
void advance_tso_fence(::google::protobuf::RpcController* controller,
149+
const AdvanceTsoFenceRequest* request, AdvanceTsoFenceResponse* response,
150+
::google::protobuf::Closure* done) override;
151+
148152
void abort_txn_with_coordinator(::google::protobuf::RpcController* controller,
149153
const AbortTxnWithCoordinatorRequest* request,
150154
AbortTxnWithCoordinatorResponse* response,
@@ -619,6 +623,12 @@ class MetaServiceProxy final : public MetaService {
619623
call_impl(&cloud::MetaService::check_txn_conflict, controller, request, response, done);
620624
}
621625

626+
void advance_tso_fence(::google::protobuf::RpcController* controller,
627+
const AdvanceTsoFenceRequest* request, AdvanceTsoFenceResponse* response,
628+
::google::protobuf::Closure* done) override {
629+
call_impl(&cloud::MetaService::advance_tso_fence, controller, request, response, done);
630+
}
631+
622632
void abort_txn_with_coordinator(::google::protobuf::RpcController* controller,
623633
const AbortTxnWithCoordinatorRequest* request,
624634
AbortTxnWithCoordinatorResponse* response,

‎cloud/src/meta-service/meta_service_helper.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ inline std::pair<MetaServiceCode, std::string> resolve_response_code_and_msg(Met
6161
"[TXN_ALREADY_COMMITED will be converted to code=UNDEFINED_ERR for old version "
6262
"clients]";
6363
return {MetaServiceCode::UNDEFINED_ERR, std::move(msg)};
64+
case MetaServiceCode::TXN_COMMIT_TSO_EXPIRED:
65+
msg += std::string((msg.empty() ? "" : ", ")) +
66+
"[TXN_COMMIT_TSO_EXPIRED will be converted to code=UNDEFINED_ERR for old "
67+
"version clients]";
68+
return {MetaServiceCode::UNDEFINED_ERR, std::move(msg)};
6469
default:
6570
return {code, std::move(msg)};
6671
}

0 commit comments

Comments
 (0)