From 6aaa8d0d731000fedd11a09dcb7260678053f1c7 Mon Sep 17 00:00:00 2001 From: obdev Date: Mon, 3 Apr 2023 18:27:11 +0800 Subject: [PATCH] Fix data_buf mem leak when index block io failed --- src/storage/ob_micro_block_handle_mgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/ob_micro_block_handle_mgr.cpp b/src/storage/ob_micro_block_handle_mgr.cpp index 494c18c259..fdfc62f787 100644 --- a/src/storage/ob_micro_block_handle_mgr.cpp +++ b/src/storage/ob_micro_block_handle_mgr.cpp @@ -98,6 +98,7 @@ int ObMicroBlockDataHandle::get_index_block_data( micro_block_id.macro_id_ = macro_block_id_; micro_block_id.offset_ = micro_info_.offset_; micro_block_id.size_ = micro_info_.size_; + is_loaded_index_block_ = true; if (OB_FAIL(ObStorageCacheSuite::get_instance().get_index_block_cache().load_block( micro_block_id, des_meta_, @@ -109,7 +110,6 @@ int ObMicroBlockDataHandle::get_index_block_data( try_release_loaded_index_block(); } else { index_block = loaded_index_block_data_; - is_loaded_index_block_ = true; } } return ret;