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 70d7a7b68b [Fix](index writer) fix dead lock when closeInternal catches CLuceneError (#207) 70d7a7b68b is described below commit 70d7a7b68b40ebbc269aa9e8b799fadf19807c4f Author: airborne12 <airborn...@gmail.com> AuthorDate: Tue Mar 26 15:31:46 2024 +0800 [Fix](index writer) fix dead lock when closeInternal catches CLuceneError (#207) This pull request addresses an issue within the closeInternal method. When Thread A invokes closeInternal and encounters a CLucene error, the method exits without setting the closing flag back to false. As a result, if another Thread B subsequently calls closeInternal and enters the waitForClose method, it becomes trapped in an infinite loop. --- src/core/CLucene/index/IndexWriter.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/CLucene/index/IndexWriter.cpp b/src/core/CLucene/index/IndexWriter.cpp index 0d770182ba..e6a0887557 100644 --- a/src/core/CLucene/index/IndexWriter.cpp +++ b/src/core/CLucene/index/IndexWriter.cpp @@ -596,8 +596,6 @@ void IndexWriter::closeInternal(bool waitForMerges) { } catch (std::bad_alloc &) { hitOOM = true; _CLTHROWA(CL_ERR_OutOfMemory, "Out of memory"); - } catch (CLuceneError &e) { - throw e; } _CLFINALLY( { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org