[BugFix] avoid BE crash when LakePersistentIndex init fail (backport #62279) (#62296)

Signed-off-by: luohaha <18810541851@163.com>
Co-authored-by: Yixin Luo <18810541851@163.com>
This commit is contained in:
mergify[bot] 2025-08-26 10:21:54 +08:00 committed by GitHub
parent b647155d20
commit 946a05b429
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -156,7 +156,9 @@ LakePersistentIndex::LakePersistentIndex(TabletManager* tablet_mgr, int64_t tabl
: PersistentIndex(""), _tablet_mgr(tablet_mgr), _tablet_id(tablet_id) {}
LakePersistentIndex::~LakePersistentIndex() {
_memtable->clear();
if (_memtable) {
_memtable->clear();
}
_sstables.clear();
}