diff --git a/src/storage/access/ob_index_tree_prefetcher.cpp b/src/storage/access/ob_index_tree_prefetcher.cpp index 337fdea62..cceda0a70 100644 --- a/src/storage/access/ob_index_tree_prefetcher.cpp +++ b/src/storage/access/ob_index_tree_prefetcher.cpp @@ -1732,15 +1732,11 @@ int ObIndexTreeMultiPassPrefetcher::p need_submit_io_))) { LOG_WARN("Fail to prefetch data block data", K(ret)); } else if (use_multi_block_prefetch_ && micro_handle.need_multi_io()) { - bool need_split = false; - if (multi_io_params_.add_micro_data(index_block_info, prefetch_idx, micro_handle, need_split)) { - if (OB_FAIL(prefetch_multi_data_block(prefetch_idx + 1))) { - LOG_WARN("Fail to prefetch multi block", K(ret)); - } else if (need_split) { - // reused after prefetch_multi_data_block - if (multi_io_params_.add_micro_data(index_block_info, prefetch_idx, micro_handle, need_split)) { - ret = OB_ERR_UNEXPECTED; - LOG_WARN("Unexpected multi_io_params status", K(ret), K_(multi_io_params)); + bool need_split = true; + while (OB_SUCC(ret) && need_split) { + if (multi_io_params_.add_micro_data(index_block_info, prefetch_idx, micro_handle, need_split)) { + if (OB_FAIL(prefetch_multi_data_block(prefetch_idx + 1))) { + LOG_WARN("Fail to prefetch multi block", K(ret)); } } } diff --git a/src/storage/blocksstable/ob_micro_block_cache.cpp b/src/storage/blocksstable/ob_micro_block_cache.cpp index f0356accd..fc5296c1f 100644 --- a/src/storage/blocksstable/ob_micro_block_cache.cpp +++ b/src/storage/blocksstable/ob_micro_block_cache.cpp @@ -274,8 +274,8 @@ int ObMultiBlockIOParam::init( { int ret = OB_SUCCESS; is_reverse_ = is_reverse; - io_read_batch_size_ = iter_param.get_io_read_batch_size(); - io_read_gap_size_ = iter_param.get_io_read_gap_size(); + io_read_batch_size_ = MAX(iter_param.get_io_read_batch_size(), 0); + io_read_gap_size_ = MAX(iter_param.get_io_read_gap_size(), 0); prefetch_idx_.set_allocator(&allocator); micro_infos_.set_allocator(&allocator); if (OB_UNLIKELY(0 >= micro_count_cap || MAX_MICRO_BLOCK_READ_COUNT < micro_count_cap)) {