This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 6a8fc35b78 [Bug](Cooldown) fix load balance causing no cooldown
replica (#16641)
6a8fc35b78 is described below
commit 6a8fc35b78a1ea66777c151a195f3e404b97028b
Author: AlexYue <[email protected]>
AuthorDate: Sun Feb 12 16:47:38 2023 +0800
[Bug](Cooldown) fix load balance causing no cooldown replica (#16641)
---
be/src/olap/tablet.cpp | 3 ++-
be/src/olap/tablet_meta.cpp | 1 +
be/src/olap/task/engine_clone_task.cpp | 13 ++++++++-----
gensrc/proto/olap_file.proto | 3 ++-
4 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index ab095be7d5..7ed8d14b43 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -1769,7 +1769,8 @@ Status Tablet::_write_cooldown_meta(io::RemoteFileSystem*
fs, RowsetMeta* new_rs
Status Tablet::_follow_cooldowned_data(io::RemoteFileSystem* fs, int64_t
cooldown_replica_id) {
LOG(INFO) << "try to follow cooldowned data. tablet_id=" << tablet_id()
- << " cooldown_replica_id=" << cooldown_replica_id;
+ << " cooldown_replica_id=" << cooldown_replica_id
+ << " local replica=" << replica_id();
TabletMetaPB cooldown_meta_pb;
RETURN_IF_ERROR(_read_cooldown_meta(fs, cooldown_replica_id,
&cooldown_meta_pb));
DCHECK(cooldown_meta_pb.rs_metas_size() > 0);
diff --git a/be/src/olap/tablet_meta.cpp b/be/src/olap/tablet_meta.cpp
index 61bb4bcf56..7562efa5b2 100644
--- a/be/src/olap/tablet_meta.cpp
+++ b/be/src/olap/tablet_meta.cpp
@@ -247,6 +247,7 @@ TabletMeta::TabletMeta(const TabletMeta& b)
: _table_id(b._table_id),
_partition_id(b._partition_id),
_tablet_id(b._tablet_id),
+ _replica_id(b._replica_id),
_schema_hash(b._schema_hash),
_shard_id(b._shard_id),
_creation_time(b._creation_time),
diff --git a/be/src/olap/task/engine_clone_task.cpp
b/be/src/olap/task/engine_clone_task.cpp
index b77373ec6b..80afdb456f 100644
--- a/be/src/olap/task/engine_clone_task.cpp
+++ b/be/src/olap/task/engine_clone_task.cpp
@@ -97,7 +97,7 @@ Status EngineCloneTask::_do_clone() {
// completed. Or remote be will just return header not the rowset
files. clone will failed.
if (missed_versions.empty()) {
LOG(INFO) << "missed version size = 0, skip clone and return
success. tablet_id="
- << _clone_req.tablet_id;
+ << _clone_req.tablet_id << " req replica=" <<
_clone_req.replica_id;
_set_tablet_info(is_new_tablet);
return Status::OK();
}
@@ -105,7 +105,8 @@ Status EngineCloneTask::_do_clone() {
LOG(INFO) << "clone to existed tablet. missed_versions_size=" <<
missed_versions.size()
<< ", allow_incremental_clone=" << allow_incremental_clone
<< ", signature=" << _signature << ", tablet_id=" <<
_clone_req.tablet_id
- << ", committed_version=" << _clone_req.committed_version;
+ << ", committed_version=" << _clone_req.committed_version
+ << ", req replica=" << _clone_req.replica_id;
// try to download missing version from src backend.
// if tablet on src backend does not contains missing version, it will
download all versions,
@@ -119,7 +120,8 @@ Status EngineCloneTask::_do_clone() {
} else {
LOG(INFO) << "clone tablet not exist, begin clone a new tablet from
remote be. "
<< "signature=" << _signature << ", tablet_id=" <<
_clone_req.tablet_id
- << ", committed_version=" << _clone_req.committed_version;
+ << ", committed_version=" << _clone_req.committed_version
+ << ", req replica=" << _clone_req.replica_id;
// create a new tablet in this be
// Get local disk from olap
string local_shard_root_path;
@@ -194,7 +196,7 @@ Status EngineCloneTask::_set_tablet_info(bool
is_new_tablet) {
}
LOG(INFO) << "clone get tablet info success. tablet_id:" <<
_clone_req.tablet_id
<< ", schema_hash:" << _clone_req.schema_hash << ", signature:"
<< _signature
- << ", version:" << tablet_info.version;
+ << ", replica id:" << _clone_req.replica_id << ", version:" <<
tablet_info.version;
_tablet_infos->push_back(tablet_info);
return Status::OK();
}
@@ -537,7 +539,8 @@ Status EngineCloneTask::_finish_incremental_clone(Tablet*
tablet,
const TabletMeta&
cloned_tablet_meta,
int64_t committed_version) {
LOG(INFO) << "begin to finish incremental clone. tablet=" <<
tablet->full_name()
- << ", committed_version=" << committed_version;
+ << ", committed_version=" << committed_version
+ << ", cloned_tablet_replica_id=" <<
cloned_tablet_meta.tablet_id();
/// Get missing versions again from local tablet.
/// We got it before outside the lock, so it has to be got again.
diff --git a/gensrc/proto/olap_file.proto b/gensrc/proto/olap_file.proto
index 16b7cf497d..df04a2a052 100644
--- a/gensrc/proto/olap_file.proto
+++ b/gensrc/proto/olap_file.proto
@@ -290,7 +290,8 @@ message TabletMetaPB {
// optional StorageMediumPB storage_medium = 19 [default = HDD];
// optional string remote_storage_name = 20;
optional int64 replica_id = 21 [default = 0];
- // optional string storage_policy = 22;
+ // 22 used to be string storage_policy = 22;
+ reserved 22;
optional DeleteBitmapPB delete_bitmap = 23;
// Use primary key index to speed up tabel unique key model
optional bool enable_unique_key_merge_on_write = 24 [default = false];
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]