From 7e1a48d9dc0fcf3d5fa5646d2a0c6e61abdc235b Mon Sep 17 00:00:00 2001 From: caifeizhi Date: Thu, 27 Apr 2023 16:18:45 +0800 Subject: [PATCH] fix unittest coredump due to block_size is 0 --- src/share/ob_local_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/ob_local_device.cpp b/src/share/ob_local_device.cpp index 4af916547..78ea7fa0c 100644 --- a/src/share/ob_local_device.cpp +++ b/src/share/ob_local_device.cpp @@ -1298,7 +1298,7 @@ int64_t ObLocalDevice::get_reserved_block_count() const int64_t ObLocalDevice::get_max_block_count(int64_t reserved_size) const { - return get_max_block_size(reserved_size) / block_size_; + return block_size_ > 0 ? get_max_block_size(reserved_size) / block_size_ : 0; } int64_t ObLocalDevice::get_max_block_size(int64_t reserved_size) const