This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new ebcf7fec6e6 [fix](packed-file) fix inverted index writer init error 
(#59923)
ebcf7fec6e6 is described below

commit ebcf7fec6e6cfbeb00d8f69579a0c643418d9924
Author: Xin Liao <[email protected]>
AuthorDate: Fri Jan 16 14:11:15 2026 +0800

    [fix](packed-file) fix inverted index writer init error (#59923)
    
    ### What problem does this PR solve?
    
    Issue Number: close #xxx
    
    Related PR: #xxx
    
    Problem Summary:
    
    The issue was caused by picking the two PRs
    https://github.com/apache/doris/pull/59364
     and https://github.com/apache/doris/pull/59693 in the wrong order.
    
    ### Release note
    
    None
    
    ### Check List (For Author)
    
    - Test <!-- At least one of them must be included. -->
        - [ ] Regression test
        - [ ] Unit Test
        - [ ] Manual test (add detailed scripts or steps below)
        - [ ] No need to test or manual test. Explain why:
    - [ ] This is a refactor/code format and no logic has been changed.
            - [ ] Previous test can cover this change.
            - [ ] No code files have been changed.
            - [ ] Other reason <!-- Add your reason?  -->
    
    - Behavior changed:
        - [ ] No.
        - [ ] Yes. <!-- Explain the behavior change -->
    
    - Does this need documentation?
        - [ ] No.
    - [ ] Yes. <!-- Add document PR link here. eg:
    https://github.com/apache/doris-website/pull/1214 -->
    
    ### Check List (For Reviewer who merge this PR)
    
    - [ ] Confirm the release note
    - [ ] Confirm test cases
    - [ ] Confirm document
    - [ ] Add branch pick label <!-- Add branch pick label that this PR
    should merge into -->
---
 .../segment_v2/inverted_index_fs_directory.cpp     | 41 ++++++++++------------
 1 file changed, 19 insertions(+), 22 deletions(-)

diff --git a/be/src/olap/rowset/segment_v2/inverted_index_fs_directory.cpp 
b/be/src/olap/rowset/segment_v2/inverted_index_fs_directory.cpp
index b67d1211806..2232369e3dd 100644
--- a/be/src/olap/rowset/segment_v2/inverted_index_fs_directory.cpp
+++ b/be/src/olap/rowset/segment_v2/inverted_index_fs_directory.cpp
@@ -925,28 +925,25 @@ DorisFSDirectory* 
DorisFSDirectoryFactory::getDirectory(const io::FileSystemSPtr
     if (config::inverted_index_ram_dir_enable && can_use_ram_dir) {
         dir = _CLNEW DorisRAMFSDirectory();
     } else {
-        // cloud mode does not need to create directory
-        if (!config::is_cloud_mode()) {
-            bool exists = false;
-            auto st = _fs->exists(file, &exists);
-            
DBUG_EXECUTE_IF("DorisFSDirectoryFactory::getDirectory_exists_status_is_not_ok",
 {
-                st = Status::Error<ErrorCode::INTERNAL_ERROR>(
-                        "debug point: "
-                        
"DorisFSDirectoryFactory::getDirectory_exists_status_is_not_ok");
-            })
-            LOG_AND_THROW_IF_ERROR(st, "Get directory exists IO error");
-            if (!exists) {
-                st = _fs->create_directory(file);
-                DBUG_EXECUTE_IF(
-                        
"DorisFSDirectoryFactory::getDirectory_create_directory_status_is_not_ok", {
-                            st = Status::Error<ErrorCode::INTERNAL_ERROR>(
-                                    "debug point: "
-                                    
"DorisFSDirectoryFactory::getDirectory_create_directory_status_"
-                                    "is_"
-                                    "not_ok");
-                        })
-                LOG_AND_THROW_IF_ERROR(st, "Get directory create directory IO 
error");
-            }
+        bool exists = false;
+        auto st = _fs->exists(file, &exists);
+        
DBUG_EXECUTE_IF("DorisFSDirectoryFactory::getDirectory_exists_status_is_not_ok",
 {
+            st = Status::Error<ErrorCode::INTERNAL_ERROR>(
+                    "debug point: "
+                    
"DorisFSDirectoryFactory::getDirectory_exists_status_is_not_ok");
+        })
+        LOG_AND_THROW_IF_ERROR(st, "Get directory exists IO error");
+        if (!exists) {
+            st = _fs->create_directory(file);
+            DBUG_EXECUTE_IF(
+                    
"DorisFSDirectoryFactory::getDirectory_create_directory_status_is_not_ok", {
+                        st = Status::Error<ErrorCode::INTERNAL_ERROR>(
+                                "debug point: "
+                                
"DorisFSDirectoryFactory::getDirectory_create_directory_status_"
+                                "is_"
+                                "not_ok");
+                    })
+            LOG_AND_THROW_IF_ERROR(st, "Get directory create directory IO 
error");
         }
         dir = _CLNEW DorisFSDirectory();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to