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


##########
be/src/olap/olap_define.h:
##########
@@ -17,14 +17,13 @@
 
 #pragma once
 
+#include <fmt/format.h>

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



##########
be/src/olap/rowset/rowset_writer_context.h:
##########
@@ -19,9 +19,9 @@
 
 #include <gen_cpp/olap_file.pb.h>

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



##########
be/test/olap/rowset/segment_v2/inverted_index_array_test.cpp:
##########
@@ -109,16 +110,20 @@ class InvertedIndexArrayTest : public testing::Test {
         
EXPECT_TRUE(io::global_local_filesystem()->delete_directory(kTestDir).ok());
     }
 
-    void test_string(std::string testname, Field* field) {
+    void test_string(std::string_view rowset_id, int seg_id, Field* field) {

Review Comment:
   warning: function 'test_string' exceeds recommended size/complexity 
thresholds [readability-function-size]
   ```cpp
       void test_string(std::string_view rowset_id, int seg_id, Field* field) {
            ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/test/olap/rowset/segment_v2/inverted_index_array_test.cpp:112:** 93 
lines including whitespace and comments (threshold 80)
   ```cpp
       void test_string(std::string_view rowset_id, int seg_id, Field* field) {
            ^
   ```
   
   </details>
   



##########
be/src/olap/rowset/rowset_meta.cpp:
##########
@@ -86,23 +86,44 @@ bool RowsetMeta::json_rowset_meta(std::string* 
json_rowset_meta) {
     return ret;
 }
 
-const io::FileSystemSPtr& RowsetMeta::fs() {
-    if (!_fs) {
-        if (is_local()) {
-            _fs = io::global_local_filesystem();
+io::FileSystemSPtr RowsetMeta::fs() {

Review Comment:
   warning: method 'fs' can be made const 
[readability-make-member-function-const]
   
   ```suggestion
   io::FileSystemSPtr RowsetMeta::fs() const {
   ```
   
   be/src/olap/rowset/rowset_meta.h:55:
   ```diff
   -     io::FileSystemSPtr fs();
   +     io::FileSystemSPtr fs() const;
   ```
   



##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -201,15 +201,12 @@ BetaRowsetWriter::BetaRowsetWriter(StorageEngine& engine)
         : _engine(engine), 
_segcompaction_worker(std::make_shared<SegcompactionWorker>(this)) {}
 
 BaseBetaRowsetWriter::~BaseBetaRowsetWriter() {
-    // TODO(lingbin): Should wrapper exception logic, no need to know file ops 
directly.
-    if (!_already_built) { // abnormal exit, remove all files generated
-        const auto& fs = _rowset_meta->fs();
-        if (!fs || !_rowset_meta->is_local()) { // Remote fs will delete them 
asynchronously
-            return;
-        }
+    if (!_already_built && _rowset_meta->is_local()) {
+        // abnormal exit, remove all files generated
+        auto& fs = io::global_local_filesystem();

Review Comment:
   warning: 'auto &fs' can be declared as 'const auto &fs' 
[readability-qualified-auto]
   
   ```suggestion
           const auto& fs = io::global_local_filesystem();
   ```
   



##########
be/src/olap/rowset/segment_v2/inverted_index_compaction.h:
##########
@@ -19,10 +19,10 @@
 #include <CLucene.h>

Review Comment:
   warning: 'CLucene.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <CLucene.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