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 4061783674 [Fix](invert index)fix s3 failed to check the directory (#21232) 4061783674 is described below commit 4061783674040753a66ad17767ef1016e1699061 Author: zzzxl <33418555+zzzxl1...@users.noreply.github.com> AuthorDate: Tue Jun 27 20:01:46 2023 +0800 [Fix](invert index)fix s3 failed to check the directory (#21232) --- .../olap/rowset/segment_v2/inverted_index_compound_directory.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 be19be580a..83660cca66 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 @@ -467,7 +467,6 @@ void DorisCompoundDirectory::init(const io::FileSystemSPtr& _fs, const char* _pa if (lock_factory == nullptr) { lock_factory = _CLNEW lucene::store::NoLockFactory(); - fs->create_directory(directory); } setLockFactory(lock_factory); @@ -476,6 +475,10 @@ void DorisCompoundDirectory::init(const io::FileSystemSPtr& _fs, const char* _pa lockFactory->setLockPrefix(nullptr); } + // It's fail checking directory existence in S3. + if (fs->type() == io::FileSystemType::S3) { + return; + } bool exists = false; Status status = fs->exists(directory, &exists); if (!status.ok()) { @@ -579,7 +582,7 @@ DorisCompoundDirectory* DorisCompoundDirectory::getDirectory( bool exists = false; _fs->exists(file, &exists); if (!exists) { - mkdir(file, 0777); + _fs->create_directory(file); } dir = _CLNEW DorisCompoundDirectory(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org