From 0e1a37387e15f80861d5329dd6f3423ad86257bd Mon Sep 17 00:00:00 2001 From: Schrodinger ZHU Yifan Date: Tue, 26 Apr 2022 18:12:51 +0800 Subject: [PATCH] fix: frame total size include header for indices (#4754) close pingcap/tiflash#4752 --- dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.h b/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.h index ea0c3265757..554ecc34b01 100644 --- a/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.h +++ b/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.h @@ -254,7 +254,7 @@ class DMFilePackFilter dmfile->configuration->getChecksumFrameLength()); index_buf->seek(dmfile->colIndexOffset(file_name_base)); auto header_size = dmfile->configuration->getChecksumHeaderLength(); - auto frame_total_size = dmfile->configuration->getChecksumFrameLength(); + auto frame_total_size = dmfile->configuration->getChecksumFrameLength() + header_size; auto frame_count = index_file_size / frame_total_size + (index_file_size % frame_total_size != 0); return MinMaxIndex::read(*type, *index_buf, index_file_size - header_size * frame_count); }