This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new c84d82bcb6a [improvement](show trash) Fix be restart slow when too
many trash files #26147 (#26417)
c84d82bcb6a is described below
commit c84d82bcb6a0ffec79a33ccd08e01ac0584c3929
Author: deardeng <[email protected]>
AuthorDate: Fri Nov 3 23:38:08 2023 +0800
[improvement](show trash) Fix be restart slow when too many trash files
#26147 (#26417)
---
be/src/olap/data_dir.cpp | 1 -
be/src/olap/olap_server.cpp | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/be/src/olap/data_dir.cpp b/be/src/olap/data_dir.cpp
index 393db80d643..c54998c76d3 100644
--- a/be/src/olap/data_dir.cpp
+++ b/be/src/olap/data_dir.cpp
@@ -122,7 +122,6 @@ Status DataDir::init() {
"check file exist failed");
}
- update_trash_capacity();
RETURN_NOT_OK_STATUS_WITH_WARN(update_capacity(), "update_capacity
failed");
RETURN_NOT_OK_STATUS_WITH_WARN(_init_cluster_id(), "_init_cluster_id
failed");
RETURN_NOT_OK_STATUS_WITH_WARN(_init_capacity_and_create_shards(),
diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp
index ac6d9326b86..aa11277a0eb 100644
--- a/be/src/olap/olap_server.cpp
+++ b/be/src/olap/olap_server.cpp
@@ -279,8 +279,7 @@ void StorageEngine::_garbage_sweeper_thread_callback() {
double usage = 1.0;
// After the program starts, the first round of cleaning starts after
min_interval.
uint32_t curr_interval = min_interval;
- while
(!_stop_background_threads_latch.wait_for(std::chrono::seconds(curr_interval))
&&
- !k_doris_exit) {
+ do {
// Function properties:
// when usage < 0.6, ratio close to 1.(interval close to
max_interval)
// when usage at [0.6, 0.75], ratio is rapidly decreasing from 0.87 to
0.27.
@@ -304,7 +303,8 @@ void StorageEngine::_garbage_sweeper_thread_callback() {
<< "see previous message for detail. err code=" <<
res;
// do nothing. continue next loop.
}
- }
+ } while
(!_stop_background_threads_latch.wait_for(std::chrono::seconds(curr_interval))
&&
+ !k_doris_exit);
}
void StorageEngine::_disk_stat_monitor_thread_callback() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]