mirror of https://github.com/facebook/rocksdb.git
fix coredump for release nullptr
Summary: Coredump will be triggered when ingest external sst file after delete range. ref https://github.com/facebook/rocksdb/issues/2398 Closes https://github.com/facebook/rocksdb/pull/2463 Differential Revision: D5275599 Pulled By: ajkr fbshipit-source-id: 0828dbc062ea8c74e913877cd63494fd3478a30d
This commit is contained in:
parent
0d278456c9
commit
c430d69eed
|
@ -286,7 +286,9 @@ InternalIterator* TableCache::NewRangeTombstoneIterator(
|
|||
if (s.ok()) {
|
||||
result = table_reader->NewRangeTombstoneIterator(options);
|
||||
if (result != nullptr) {
|
||||
result->RegisterCleanup(&UnrefEntry, cache_, handle);
|
||||
if (handle != nullptr) {
|
||||
result->RegisterCleanup(&UnrefEntry, cache_, handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result == nullptr && handle != nullptr) {
|
||||
|
|
Loading…
Reference in New Issue