xiaokang commented on code in PR #16861: URL: https://github.com/apache/doris/pull/16861#discussion_r1109287373
########## be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp: ########## @@ -300,17 +300,9 @@ lucene::store::IndexInput* DorisCompoundDirectory::FSIndexInput::clone() const { void DorisCompoundDirectory::FSIndexInput::close() { BufferedIndexInput::close(); if (_handle != nullptr) { - _handle->_shared_lock.lock(); - - //determine if we are about to delete the handle... - bool dounlock = (_LUCENE_ATOMIC_INT_GET(_handle->__cl_refcount) > 1); - - //decdelete (deletes if refcount is down to 0 + std::lock_guard<std::mutex> wlock(_handle->_shared_lock); Review Comment: If _CLDECDELETE(_handle) delete _handle on refcount == 0, _handle->_shared_lock mutex will be deleted. It will cause lock_guard unlock a deleted mutex. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org