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

kxiao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new d05614ef51 [Fix](invert index)all directories use NoLock (#20962)
d05614ef51 is described below

commit d05614ef51e70f440d237be6ed9e37df5011a4ab
Author: zzzxl <[email protected]>
AuthorDate: Tue Jun 20 12:12:16 2023 +0800

    [Fix](invert index)all directories use NoLock (#20962)
---
 be/src/clucene                                               |  2 +-
 .../rowset/segment_v2/inverted_index_compound_directory.cpp  | 12 ++----------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/be/src/clucene b/be/src/clucene
index 383dc02905..60f5eab7ac 160000
--- a/be/src/clucene
+++ b/be/src/clucene
@@ -1 +1 @@
-Subproject commit 383dc029059a7fc7ff61893af1371570bc20b5f1
+Subproject commit 60f5eab7ac6294493a2e7e290297000c3c39875c
diff --git 
a/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp 
b/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp
index 447f8e9e12..be19be580a 100644
--- a/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp
+++ b/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp
@@ -466,12 +466,8 @@ void DorisCompoundDirectory::init(const 
io::FileSystemSPtr& _fs, const char* _pa
     bool doClearLockID = false;
 
     if (lock_factory == nullptr) {
-        if (disableLocks) {
-            lock_factory = lucene::store::NoLockFactory::getNoLockFactory();
-        } else {
-            lock_factory = _CLNEW 
lucene::store::FSLockFactory(directory.c_str(), this->filemode);
-            doClearLockID = true;
-        }
+        lock_factory = _CLNEW lucene::store::NoLockFactory();
+        fs->create_directory(directory);
     }
 
     setLockFactory(lock_factory);
@@ -480,10 +476,6 @@ void DorisCompoundDirectory::init(const 
io::FileSystemSPtr& _fs, const char* _pa
         lockFactory->setLockPrefix(nullptr);
     }
 
-    // It's meaningless checking directory existence in S3.
-    if (fs->type() == io::FileSystemType::S3) {
-        return;
-    }
     bool exists = false;
     Status status = fs->exists(directory, &exists);
     if (!status.ok()) {


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

Reply via email to