From 54fc8295d9e6bfd1c7d1fa78beb94c4158d6771f Mon Sep 17 00:00:00 2001 From: Xiaoxi Chen Date: Mon, 21 Oct 2024 15:04:05 +0800 Subject: [PATCH] Count in ovf headers. We see no space error in write_to_full ut, might due to when left space == max_wrt_sz and we take max_wrt_sz, however two extra blks are needed. Signed-off-by: Xiaoxi Chen --- conanfile.py | 2 +- src/tests/test_meta_blk_mgr.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 0e7fa7d89..deee0421d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class HomestoreConan(ConanFile): name = "homestore" - version = "6.4.65" + version = "6.4.66" homepage = "https://github.com/eBay/Homestore" description = "HomeStore Storage Engine" diff --git a/src/tests/test_meta_blk_mgr.cpp b/src/tests/test_meta_blk_mgr.cpp index 640d6ac84..af80e9da5 100644 --- a/src/tests/test_meta_blk_mgr.cpp +++ b/src/tests/test_meta_blk_mgr.cpp @@ -195,7 +195,8 @@ class VMetaBlkMgrTest : public ::testing::Test { uint64_t size_written{0}; while (free_size > 0) { - if (free_size >= gp.max_wrt_sz) { + // if it is overflow, 2 extra blocks are needed for ovf blk header and meta blk; + if (free_size - 2 * m_mbm->block_size() >= gp.max_wrt_sz) { size_written = do_sb_write(do_overflow(), 0); } else { size_written = do_sb_write(false, m_mbm->meta_blk_context_sz());