yujun777 commented on code in PR #29818:
URL: https://github.com/apache/doris/pull/29818#discussion_r1447374343
##########
be/src/olap/storage_engine.cpp:
##########
@@ -448,45 +449,85 @@
return Status::OK();
}
+StorageEngine::Disk_remaining_level get_available_level(double
disk_usage_percent) {
+ assert(disk_usage_percent >= 0 && disk_usage_percent <= 1);
+ if (disk_usage_percent < 0.7) {
+ return StorageEngine::Disk_remaining_level::LOW;
+ } else if (disk_usage_percent < 0.85) {
+ return StorageEngine::Disk_remaining_level::MID;
+ } else {
+ return StorageEngine::Disk_remaining_level::HIGH;
+ }
+ return StorageEngine::Disk_remaining_level::LOW;
+}
+
std::vector<DataDir*> StorageEngine::get_stores_for_create_tablet(
TStorageMedium::type storage_medium) {
+ struct DirInfo {
+ DataDir* data_dir;
+
+ StorageEngine::Disk_remaining_level available_level;
+
+ bool operator<(const DirInfo& other) {
Review Comment:
use ‘bool operator<(const DirInfo& other) const’.
if missing the last const, clang will compile failed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]