Skip to content

Commit

Permalink
[branch-2.1](log) add tablet clear cache log (#38713)
Browse files Browse the repository at this point in the history
  • Loading branch information
yujun777 authored Aug 2, 2024
1 parent e140613 commit 327069f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion be/src/agent/task_worker_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,9 @@ void create_tablet_callback(StorageEngine& engine, const TAgentTaskRequest& req)
COUNTER_UPDATE(profile->total_time_counter(), elapsed_time);
std::stringstream ss;
profile->pretty_print(&ss);
LOG(WARNING) << "create tablet cost(s) " << elapsed_time / 1e9 << std::endl << ss.str();
LOG(WARNING) << "create tablet " << create_tablet_req.tablet_id << " cost(s) "
<< elapsed_time / 1e9 << std::endl
<< ss.str();
}
});
DorisMetrics::instance()->create_tablet_requests_total->increment(1);
Expand Down
1 change: 1 addition & 0 deletions be/src/olap/tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3945,6 +3945,7 @@ Status Tablet::ingest_binlog_metas(RowsetBinlogMetasPB* metas_pb) {

void Tablet::clear_cache() {
std::shared_lock rlock(get_header_lock());
SCOPED_SIMPLE_TRACE_IF_TIMEOUT(TRACE_TABLET_LOCK_THRESHOLD);
static auto recycle_segment_cache = [](const auto& rowset_map) {
for (auto& [_, rowset] : rowset_map) {
rowset->clear_cache();
Expand Down

0 comments on commit 327069f

Please sign in to comment.