github-actions[bot] commented on code in PR #27726:
URL: https://github.com/apache/doris/pull/27726#discussion_r1407950529


##########
be/src/olap/wal_manager.cpp:
##########
@@ -75,11 +76,37 @@ Status WalManager::init() {
         }
         RETURN_IF_ERROR(scan_wals(wal_dir));
     }
+    size_t available_bytes;
+    size_t disk_capacity_bytes;
+    // Get the root path available space.
+    RETURN_IF_ERROR(io::global_local_filesystem()->get_space_info("./", 
&disk_capacity_bytes,
+                                                                  
&available_bytes));
+    RETURN_IF_ERROR(init_wal_limit(available_bytes));
     return Thread::create(
             "WalMgr", "replay_wal", [this]() { 
static_cast<void>(this->replay()); },
             &_replay_thread);
 }
 
+Status WalManager::init_wal_limit(size_t available_bytes) {

Review Comment:
   warning: method 'init_wal_limit' can be made static 
[readability-convert-member-functions-to-static]
   
   be/src/olap/wal_manager.h:75:
   ```diff
   -     Status init_wal_limit(size_t available_bytes);
   +     static Status init_wal_limit(size_t available_bytes);
   ```
   



##########
be/src/olap/wal_manager.h:
##########
@@ -15,9 +15,12 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#pragma once
+
 #include <gen_cpp/PaloInternalService_types.h>

Review Comment:
   warning: 'gen_cpp/PaloInternalService_types.h' file not found 
[clang-diagnostic-error]
   ```cpp
   #include <gen_cpp/PaloInternalService_types.h>
            ^
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to