Skip to content

Commit

Permalink
[Fix](inverted index) try not to delete entries in DorisCompoundReade…
Browse files Browse the repository at this point in the history
…r::close (apache#36420)

Deleting entries in DorisCompoundReader::close() might lead to a
coredump in certain cases, especially with problematic inverted index
files.
  • Loading branch information
airborne12 authored Jun 18, 2024
1 parent 3aa8b68 commit ab18c0f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ DorisCompoundReader::~DorisCompoundReader() {
LOG(ERROR) << "DorisCompoundReader finalize error:" << err.what();
}
}
_CLDELETE(entries)
}

const char* DorisCompoundReader::getClassName() {
Expand Down Expand Up @@ -294,7 +295,6 @@ void DorisCompoundReader::close() {
}
if (entries != nullptr) {
entries->clear();
_CLDELETE(entries)
}
if (ram_dir) {
ram_dir->close();
Expand Down

0 comments on commit ab18c0f

Please sign in to comment.