Skip to content

Commit

Permalink
[Fix](index writer) fix core if docWriter nullptr when IndexWriter do…
Browse files Browse the repository at this point in the history
…Flush (#213)
  • Loading branch information
airborne12 authored May 10, 2024
1 parent d3de160 commit 9e1fd04
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/CLucene/index/IndexWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2048,6 +2048,11 @@ void IndexWriter::flush(bool triggerMerge, bool _flushDocStores) {
bool IndexWriter::doFlush(bool _flushDocStores) {
SCOPED_LOCK_MUTEX(THIS_LOCK)

// if docWriter is nullptr, maybe it's been flushed already
if (docWriter == nullptr) {
return false;
}

// Make sure no threads are actively adding a document

// Returns true if docWriter is currently aborting, in
Expand Down

0 comments on commit 9e1fd04

Please sign in to comment.