This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0-var
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0-var by this push:
new 89022de6170 [fix](invert index) Fix the issue where the reader does
not release the file descriptor (fd) (#27908)
89022de6170 is described below
commit 89022de6170efaaf6d32c896da77f7872b04cb1e
Author: zzzxl <[email protected]>
AuthorDate: Sun Dec 3 10:38:14 2023 +0800
[fix](invert index) Fix the issue where the reader does not release the
file descriptor (fd) (#27908)
---
be/src/olap/rowset/segment_v2/inverted_index_cache.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/be/src/olap/rowset/segment_v2/inverted_index_cache.cpp
b/be/src/olap/rowset/segment_v2/inverted_index_cache.cpp
index 7a59e2d7cdf..f3c68984ebb 100644
--- a/be/src/olap/rowset/segment_v2/inverted_index_cache.cpp
+++ b/be/src/olap/rowset/segment_v2/inverted_index_cache.cpp
@@ -47,9 +47,8 @@ IndexSearcherPtr
InvertedIndexSearcherCache::build_index_searcher(const io::File
new DorisCompoundReader(DorisCompoundDirectory::getDirectory(fs,
index_dir.c_str()),
file_name.c_str(),
config::inverted_index_read_buffer_size);
auto closeDirectory = true;
- auto reader = lucene::index::IndexReader::open(
- directory, config::inverted_index_read_buffer_size,
closeDirectory);
- auto index_searcher =
std::make_shared<lucene::search::IndexSearcher>(reader);
+ auto index_searcher =
+ std::make_shared<lucene::search::IndexSearcher>(directory,
closeDirectory);
// NOTE: need to cl_refcount-- here, so that directory will be deleted when
// index_searcher is destroyed
_CLDECDELETE(directory)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]