This is an automated email from the ASF dual-hosted git repository.

jianliangqi pushed a commit to branch clucene-2.0
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git


The following commit(s) were added to refs/heads/clucene-2.0 by this push:
     new f40d429ac0 [Pick 2.0](index writer) fix dead lock when closeInternal 
catches CLuceneError (#207) (#212)
f40d429ac0 is described below

commit f40d429ac098b6b61aa9e69f2eee64bbf6150d73
Author: airborne12 <[email protected]>
AuthorDate: Thu May 9 11:20:16 2024 +0800

    [Pick 2.0](index writer) fix dead lock when closeInternal catches 
CLuceneError (#207) (#212)
    
    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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to