From 5a35ec6391095a9a91457e1596c203ebd6fe8f22 Mon Sep 17 00:00:00 2001 From: dongb0 <708848999@qq.com> Date: Mon, 9 Dec 2024 09:45:33 +0000 Subject: [PATCH] fix sn tmp file ut core dump --- mittest/mtlenv/storage/tmp_file/test_tmp_file.cpp | 8 ++++---- src/objit/src/ob_llvm_di_helper.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mittest/mtlenv/storage/tmp_file/test_tmp_file.cpp b/mittest/mtlenv/storage/tmp_file/test_tmp_file.cpp index 5dd33e74a..b9cc65554 100644 --- a/mittest/mtlenv/storage/tmp_file/test_tmp_file.cpp +++ b/mittest/mtlenv/storage/tmp_file/test_tmp_file.cpp @@ -1798,7 +1798,7 @@ void rand_shrink_or_expand_wbp(ObTmpWriteBufferPool &wbp, bool &has_stop) if (cnt == 0) { rand_wbp_size = ObRandom::rand(SMALL_WBP_MEM_LIMIT, BIG_WBP_MEM_LIMIT / 2); } else { - rand_wbp_size = ObRandom::rand(BIG_WBP_MEM_LIMIT / 2, BIG_WBP_MEM_LIMIT * 2); + rand_wbp_size = ObRandom::rand(BIG_WBP_MEM_LIMIT / 2, BIG_WBP_MEM_LIMIT); } rand_wbp_size = (rand_wbp_size + WBP_BLOCK_SIZE - 1) / WBP_BLOCK_SIZE * WBP_BLOCK_SIZE; ATOMIC_SET(&wbp.default_wbp_memory_limit_, rand_wbp_size); @@ -1829,10 +1829,10 @@ TEST_F(TestTmpFile, test_multi_file_wr_when_wbp_shrink_and_expand) bool has_stop = false; std::thread t(rand_shrink_or_expand_wbp, std::ref(wbp), std::ref(has_stop)); - const int64_t read_thread_cnt = 2; - const int64_t file_cnt = 128; + const int64_t read_thread_cnt = 1; + const int64_t file_cnt = 32; const int64_t batch_size = 3 * 1024 * 1024; - const int64_t batch_num = 2; // total 128 * 3MB * 2 = 768MB + const int64_t batch_num = 2; // total 32 * 3MB * 2 = 192MB const bool disable_block_cache = true; TestMultiTmpFileStress test(MTL_CTX()); ret = test.init(file_cnt, dir, read_thread_cnt, IO_WAIT_TIME_MS, batch_size, batch_num, disable_block_cache); diff --git a/src/objit/src/ob_llvm_di_helper.cpp b/src/objit/src/ob_llvm_di_helper.cpp index 8b7e5737b..bc14135f4 100644 --- a/src/objit/src/ob_llvm_di_helper.cpp +++ b/src/objit/src/ob_llvm_di_helper.cpp @@ -428,9 +428,9 @@ ObLLVMDIHelper::ObDIBasicTypeAttr ObLLVMDIHelper::basic_type_[common::ObMaxType] {"mediumint", 32, 32, llvm::dwarf::DW_ATE_signed}, {"int", 32, 32, llvm::dwarf::DW_ATE_signed}, {"bigint", 64, 64, llvm::dwarf::DW_ATE_signed}, - {"tinyint unsigned", 8, 8, llvm::dwarf::DW_ATE_unsigned}, - {"smallint unsigned", 16, 16, llvm::dwarf::DW_ATE_unsigned}, - {"mediumint unsigned", 32, 32, llvm::dwarf::DW_ATE_unsigned}, + {"tinyint unsigned", 8, 8, llvm::dwarf::DW_ATE_unsigned}, + {"smallint unsigned", 16, 16, llvm::dwarf::DW_ATE_unsigned}, + {"mediumint unsigned", 32, 32, llvm::dwarf::DW_ATE_unsigned}, {"int unsigned", 32, 32, llvm::dwarf::DW_ATE_unsigned}, {"bigint unsigned", 64, 64, llvm::dwarf::DW_ATE_unsigned}, {"float", 32, 32, llvm::dwarf::DW_ATE_float},