This is an automated email from the ASF dual-hosted git repository.
w41ter pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new ad4fe3d5329 [chore](cloud) Correct spelling succeed instance to
successor instance (#57746)
ad4fe3d5329 is described below
commit ad4fe3d53294baf66892db9cad9bb21e6e64ec71
Author: walter <[email protected]>
AuthorDate: Mon Nov 10 14:29:59 2025 +0800
[chore](cloud) Correct spelling succeed instance to successor instance
(#57746)
---
cloud/src/resource-manager/resource_manager.cpp | 14 +++++++-------
cloud/test/resource_test.cpp | 6 +++---
gensrc/proto/cloud.proto | 2 +-
.../org/apache/doris/regression/suite/SuiteCluster.groovy | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/cloud/src/resource-manager/resource_manager.cpp
b/cloud/src/resource-manager/resource_manager.cpp
index ad412fb57f8..6af1673bd45 100644
--- a/cloud/src/resource-manager/resource_manager.cpp
+++ b/cloud/src/resource-manager/resource_manager.cpp
@@ -1413,24 +1413,24 @@ std::pair<MetaServiceCode, std::string>
ResourceManager::refresh_instance(
void ResourceManager::refresh_instance(const std::string& instance_id,
const InstanceInfoPB& instance) {
- bool is_succeed_instance = instance.has_original_instance_id();
- std::string source_instance_id = is_succeed_instance ?
instance.source_instance_id() : "";
+ bool is_successor_instance = instance.has_original_instance_id();
+ std::string source_instance_id = is_successor_instance ?
instance.source_instance_id() : "";
std::lock_guard l(mtx_);
for (auto i = node_info_.begin(); i != node_info_.end();) {
- // erase all nodes belong to this instance_id
+ // erase all nodes not belong to this instance_id
if (i->second.instance_id != instance_id &&
- // ... or, if is_succeed_instance, erase nodes belong to
source_instance_id
- (!is_succeed_instance || i->second.instance_id !=
source_instance_id)) {
+ // ... or, if is_successor_instance, erase nodes belong to
source_instance_id
+ (!is_successor_instance || i->second.instance_id !=
source_instance_id)) {
++i;
continue;
}
i = node_info_.erase(i);
}
- // If succeed_instance_id is set, it means this instance has a succeeded
instance,
+ // If successor_instance_id is set, it means this instance has a successor
instance,
// so we do not need to add its clusters to the index again.
- if (!instance.has_succeed_instance_id()) {
+ if (!instance.has_successor_instance_id()) {
for (int i = 0; i < instance.clusters_size(); ++i) {
add_cluster_to_index_no_lock(instance_id, instance.clusters(i));
}
diff --git a/cloud/test/resource_test.cpp b/cloud/test/resource_test.cpp
index 0e198ddb542..a25577df0c1 100644
--- a/cloud/test/resource_test.cpp
+++ b/cloud/test/resource_test.cpp
@@ -903,7 +903,7 @@ TEST(ResourceTest, RollbackInstance) {
create_instance(meta_service.get(), new_instance_id);
// Set source_instance_id and original_instance_id for new instance
- // Set succeed_instance_id for old instance
+ // Set successor_instance_id for old instance
{
std::unique_ptr<Transaction> txn;
ASSERT_EQ(meta_service->txn_kv()->create_txn(&txn),
TxnErrorCode::TXN_OK);
@@ -929,8 +929,8 @@ TEST(ResourceTest, RollbackInstance) {
new_instance.mutable_clusters()->CopyFrom(original_instance.clusters());
txn->put(new_key, new_instance.SerializeAsString());
- // Update original instance with succeed_instance_id
- original_instance.set_succeed_instance_id(new_instance_id);
+ // Update original instance with successor_instance_id
+ original_instance.set_successor_instance_id(new_instance_id);
txn->put(original_key, original_instance.SerializeAsString());
ASSERT_EQ(txn->commit(), TxnErrorCode::TXN_OK);
diff --git a/gensrc/proto/cloud.proto b/gensrc/proto/cloud.proto
index 55ecc66d792..2f1c08e25a4 100644
--- a/gensrc/proto/cloud.proto
+++ b/gensrc/proto/cloud.proto
@@ -128,7 +128,7 @@ message InstanceInfoPB {
// Inherited from which instance (only used during rollback, the earliest
instance id).
optional string original_instance_id = 114;
- optional string succeed_instance_id = 115; // The last heir (only used
during rollback).
+ optional string successor_instance_id = 115; // The last heir (only used
during rollback).
optional bool ready_only = 116; // A read only instance.
// Snapshot properties.
diff --git
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/SuiteCluster.groovy
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/SuiteCluster.groovy
index 06ee3c3e17a..cb6643aaf7c 100644
---
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/SuiteCluster.groovy
+++
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/SuiteCluster.groovy
@@ -778,9 +778,9 @@ class SuiteCluster {
throw new Exception("Failed to parse clusterSnapshot JSON:
${e.message}")
}
- // Check is_succeed field
- def isSucceed = snapshotObj.get('is_succeed')
- assert isSucceed == true : "clusterSnapshot is_succeed field must be
true, but got: ${isSucceed}"
+ // Check is_successor field
+ def isSuccessor = snapshotObj.get('is_successor')
+ assert isSuccessor == true : "clusterSnapshot is_successor field must
be true, but got: ${isSuccessor}"
// Extract instance_id from snapshot
String instanceId = (String) snapshotObj.get('instance_id')
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]