This is an automated email from the ASF dual-hosted git repository. jianliangqi pushed a commit to branch clucene in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene by this push: new 3c5d1e4a [fix](reader)fFig file descriptor (fd) leak issu. (#144) 3c5d1e4a is described below commit 3c5d1e4a4ba1ccfdad7c70aac8c303847b1f7a6d Author: zzzxl <33418555+zzzxl1...@users.noreply.github.com> AuthorDate: Tue Dec 5 18:05:53 2023 +0800 [fix](reader)fFig file descriptor (fd) leak issu. (#144) --- src/core/CLucene/search/IndexSearcher.cpp | 4 ++-- src/core/CLucene/search/IndexSearcher.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/CLucene/search/IndexSearcher.cpp b/src/core/CLucene/search/IndexSearcher.cpp index add92435..f5b313a3 100644 --- a/src/core/CLucene/search/IndexSearcher.cpp +++ b/src/core/CLucene/search/IndexSearcher.cpp @@ -161,14 +161,14 @@ CL_NS_DEF(search) readerOwner = true; } - IndexSearcher::IndexSearcher(IndexReader* r){ + IndexSearcher::IndexSearcher(IndexReader* r, bool isOwner){ //Func - Constructor // Creates a searcher searching the index with the provide IndexReader //Pre - path != NULL //Post - The instance has been created reader = r; - readerOwner = false; + readerOwner = isOwner; } IndexSearcher::~IndexSearcher(){ diff --git a/src/core/CLucene/search/IndexSearcher.h b/src/core/CLucene/search/IndexSearcher.h index 3426cd7a..8f0b2000 100644 --- a/src/core/CLucene/search/IndexSearcher.h +++ b/src/core/CLucene/search/IndexSearcher.h @@ -63,7 +63,7 @@ public: IndexSearcher(CL_NS(store)::Directory* directory, bool closeDirector); /** Creates a searcher searching the provided index. */ - IndexSearcher(CL_NS(index)::IndexReader* r); + IndexSearcher(CL_NS(index)::IndexReader* r, bool isOwner = false); ~IndexSearcher(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org