This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 7ffb0014f48 branch-3.0: [fix](compaction) tablet is not removed in
compaction queue if dropped #45085 (#45135)
7ffb0014f48 is described below
commit 7ffb0014f48de16e24f672c1d00ff52715e1764c
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Dec 11 22:46:33 2024 +0800
branch-3.0: [fix](compaction) tablet is not removed in compaction queue if
dropped #45085 (#45135)
Cherry-picked from #45085
Co-authored-by: meiyi <[email protected]>
---
be/src/agent/task_worker_pool.cpp | 4 +++-
be/src/olap/olap_server.cpp | 3 ++-
be/src/olap/tablet_manager.cpp | 20 ++++++++++----------
be/src/olap/tablet_meta_manager.cpp | 3 +--
4 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/be/src/agent/task_worker_pool.cpp
b/be/src/agent/task_worker_pool.cpp
index 01b107b3ea7..a8cbac9326d 100644
--- a/be/src/agent/task_worker_pool.cpp
+++ b/be/src/agent/task_worker_pool.cpp
@@ -1640,11 +1640,13 @@ void drop_tablet_callback(StorageEngine& engine, const
TAgentTaskRequest& req) {
dropped_tablet->tablet_uid());
LOG_INFO("successfully drop tablet")
.tag("signature", req.signature)
- .tag("tablet_id", drop_tablet_req.tablet_id);
+ .tag("tablet_id", drop_tablet_req.tablet_id)
+ .tag("replica_id", drop_tablet_req.replica_id);
} else {
LOG_WARNING("failed to drop tablet")
.tag("signature", req.signature)
.tag("tablet_id", drop_tablet_req.tablet_id)
+ .tag("replica_id", drop_tablet_req.replica_id)
.error(status);
}
diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp
index a0c5a05636b..b4d0f56288d 100644
--- a/be/src/olap/olap_server.cpp
+++ b/be/src/olap/olap_server.cpp
@@ -1040,7 +1040,8 @@ Status
StorageEngine::_submit_compaction_task(TabletSharedPtr tablet,
if (!tablet->can_do_compaction(tablet->data_dir()->path_hash(),
compaction_type)) {
LOG(INFO) << "Tablet state has been changed, no need to begin
this compaction "
"task, tablet_id="
- << tablet->tablet_id() << "tablet_state=" <<
tablet->tablet_state();
+ << tablet->tablet_id() << ", tablet_state=" <<
tablet->tablet_state();
+ _pop_tablet_from_submitted_compaction(tablet, compaction_type);
return;
}
tablet->compaction_stage = CompactionStage::EXECUTING;
diff --git a/be/src/olap/tablet_manager.cpp b/be/src/olap/tablet_manager.cpp
index 5a5f98c969e..0bd89cc96ac 100644
--- a/be/src/olap/tablet_manager.cpp
+++ b/be/src/olap/tablet_manager.cpp
@@ -1180,14 +1180,14 @@ bool TabletManager::_move_tablet_to_trash(const
TabletSharedPtr& tablet) {
if (tablet_in_not_shutdown->tablet_path() !=
tablet->tablet_path()) {
LOG(INFO) << "tablet path not eq shutdown tablet path, move it
to trash, tablet_id="
<< tablet_in_not_shutdown->tablet_id()
- << " mem manager tablet path=" <<
tablet_in_not_shutdown->tablet_path()
- << " shutdown tablet path=" << tablet->tablet_path();
+ << ", mem manager tablet path=" <<
tablet_in_not_shutdown->tablet_path()
+ << ", shutdown tablet path=" <<
tablet->tablet_path();
return
tablet->data_dir()->move_to_trash(tablet->tablet_path());
} else {
LOG(INFO) << "tablet path eq shutdown tablet path, not move to
trash, tablet_id="
<< tablet_in_not_shutdown->tablet_id()
- << " mem manager tablet path=" <<
tablet_in_not_shutdown->tablet_path()
- << " shutdown tablet path=" << tablet->tablet_path();
+ << ", mem manager tablet path=" <<
tablet_in_not_shutdown->tablet_path()
+ << ", shutdown tablet path=" <<
tablet->tablet_path();
return true;
}
}
@@ -1292,7 +1292,7 @@ Status TabletManager::register_transition_tablet(int64_t
tablet_id, std::string
// not found
shard.tablets_under_transition[tablet_id] = std::make_tuple(reason,
thread_id, 1);
LOG(INFO) << "add tablet_id= " << tablet_id << " to map, reason=" <<
reason
- << " lock times=1 thread_id_in_map=" << thread_id;
+ << ", lock times=1, thread_id_in_map=" << thread_id;
return Status::OK();
} else {
// found
@@ -1300,15 +1300,15 @@ Status
TabletManager::register_transition_tablet(int64_t tablet_id, std::string
if (thread_id != thread_id_in_map) {
// other thread, failed
LOG(INFO) << "tablet_id = " << tablet_id << " is doing " << r
- << " thread_id_in_map=" << thread_id_in_map << " , add
reason=" << reason
- << " thread_id=" << thread_id;
+ << ", thread_id_in_map=" << thread_id_in_map << " , add
reason=" << reason
+ << ", thread_id=" << thread_id;
return Status::InternalError<false>("{} failed try later,
tablet_id={}", reason,
tablet_id);
}
// add lock times
++lock_times;
LOG(INFO) << "add tablet_id= " << tablet_id << " to map, reason=" <<
reason
- << " lock times=" << lock_times << " thread_id_in_map=" <<
thread_id_in_map;
+ << ", lock times=" << lock_times << ", thread_id_in_map=" <<
thread_id_in_map;
return Status::OK();
}
}
@@ -1332,10 +1332,10 @@ void
TabletManager::unregister_transition_tablet(int64_t tablet_id, std::string
--lock_times;
if (lock_times != 0) {
LOG(INFO) << "erase tablet_id= " << tablet_id << " from map,
reason=" << reason
- << " left=" << lock_times << " thread_id_in_map=" <<
thread_id_in_map;
+ << ", left=" << lock_times << ", thread_id_in_map=" <<
thread_id_in_map;
} else {
LOG(INFO) << "erase tablet_id= " << tablet_id << " from map,
reason=" << reason
- << " thread_id_in_map=" << thread_id_in_map;
+ << ", thread_id_in_map=" << thread_id_in_map;
shard.tablets_under_transition.erase(tablet_id);
}
}
diff --git a/be/src/olap/tablet_meta_manager.cpp
b/be/src/olap/tablet_meta_manager.cpp
index 6f27dd4db4e..7c08d785620 100644
--- a/be/src/olap/tablet_meta_manager.cpp
+++ b/be/src/olap/tablet_meta_manager.cpp
@@ -291,8 +291,7 @@ Status
TabletMetaManager::remove_old_version_delete_bitmap(DataDir* store, TTabl
return true;
};
LOG(INFO) << "remove old version delete bitmap, tablet_id: " << tablet_id
- << " version: " << version << " removed keys size: " <<
remove_keys.size();
- ;
+ << " version: " << version << ", removed keys size: " <<
remove_keys.size();
RETURN_IF_ERROR(meta->iterate(META_COLUMN_FAMILY_INDEX, begin_key,
get_remove_keys_func));
return meta->remove(META_COLUMN_FAMILY_INDEX, remove_keys);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]