This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 8f0276809a9 branch-2.1: [fix](compaction) tablet is not removed in
compaction queue if dropped #45085 (#45136)
8f0276809a9 is described below
commit 8f0276809a90b9f3a0f3cf1e4ded551f24d7a6b2
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Dec 7 12:15:20 2024 +0800
branch-2.1: [fix](compaction) tablet is not removed in compaction queue if
dropped #45085 (#45136)
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 4d3cd876b5c..f3302fc2f3e 100644
--- a/be/src/agent/task_worker_pool.cpp
+++ b/be/src/agent/task_worker_pool.cpp
@@ -1438,11 +1438,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 f5f796d973b..f3fdd552164 100644
--- a/be/src/olap/olap_server.cpp
+++ b/be/src/olap/olap_server.cpp
@@ -1046,7 +1046,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 bfa23257cb0..23d2b11fc45 100644
--- a/be/src/olap/tablet_manager.cpp
+++ b/be/src/olap/tablet_manager.cpp
@@ -1146,14 +1146,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;
}
}
@@ -1258,7 +1258,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
@@ -1266,15 +1266,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();
}
}
@@ -1298,10 +1298,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 48fb9a9a41b..18343afcbcd 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]