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 315b25ba70 [Fix](index writer) fix docWriter is null, when reenter
close (#214)
315b25ba70 is described below
commit 315b25ba70adc6f7f303183897317cc88a860a3a
Author: airborne12 <[email protected]>
AuthorDate: Tue May 14 16:43:36 2024 +0800
[Fix](index writer) fix docWriter is null, when reenter close (#214)
---
src/core/CLucene/index/IndexWriter.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/core/CLucene/index/IndexWriter.cpp
b/src/core/CLucene/index/IndexWriter.cpp
index e2e6ae7d73..8bc3a93455 100644
--- a/src/core/CLucene/index/IndexWriter.cpp
+++ b/src/core/CLucene/index/IndexWriter.cpp
@@ -535,7 +535,10 @@ void IndexWriter::closeInternal(bool waitForMerges) {
try {
if (infoStream != NULL)
message(string("now flush at close"));
-
+ // if docWriter is nullptr, maybe it's been flushed already
+ if (docWriter == nullptr) {
+ return;
+ }
docWriter->close();
// Only allow a _CLNEW merge to be triggered if we are
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]