From eeda4a2c3824cd54bcb81311e302f50ef7ca0024 Mon Sep 17 00:00:00 2001 From: lalalafeier Date: Tue, 7 May 2024 12:42:26 +0000 Subject: [PATCH] bugfix about the hash set memory application exceeding the upper limit --- src/storage/blocksstable/ob_tmp_file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/blocksstable/ob_tmp_file.cpp b/src/storage/blocksstable/ob_tmp_file.cpp index 711e19f578..b7dfd6c59c 100644 --- a/src/storage/blocksstable/ob_tmp_file.cpp +++ b/src/storage/blocksstable/ob_tmp_file.cpp @@ -1230,7 +1230,7 @@ int ObTmpFile::sync(const int64_t timeout_ms) const ObIArray &extents = file_meta_.get_extents(); common::hash::ObHashSet blk_id_set; lib::ObMemAttr attr(tenant_id_, "TmpBlkIDSet"); - if (OB_FAIL(blk_id_set.create(extents.count(), attr))){ + if (OB_FAIL(blk_id_set.create(min(extents.count(), 1024 * 1024), attr))){ STORAGE_LOG(WARN, "create block id set failed", K(ret), K(timeout_ms)); } else { // get extents block id set.