This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 650322f33d0362244d3060914597fb00e2f57bc9 Author: zzzxl <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
