From e43d803a55854c8268d282fbe34ca81baba32556 Mon Sep 17 00:00:00 2001 From: obdev Date: Tue, 14 Mar 2023 14:41:36 +0000 Subject: [PATCH] fix merge sort OOM when add merge ways --- src/sql/engine/basic/ob_chunk_datum_store.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/engine/basic/ob_chunk_datum_store.cpp b/src/sql/engine/basic/ob_chunk_datum_store.cpp index bd3d82d7d8..b202d9e573 100644 --- a/src/sql/engine/basic/ob_chunk_datum_store.cpp +++ b/src/sql/engine/basic/ob_chunk_datum_store.cpp @@ -1846,7 +1846,7 @@ void ObChunkDatumStore::ChunkIterator::try_free_cached_blocks() const int64_t age = *((int64_t *)((char *)b + b->blk_size_ - sizeof(int64_t))); if (age < read_age) { b = cached_.remove_first(); - if (b->blk_size_ == default_block_size_) { + if (b->blk_size_ == default_block_size_ && 0 == free_list_.get_size()) { #ifndef NDEBUG memset((char *)b + sizeof(*b), 0xAA, b->blk_size_ - sizeof(*b)); #endif