From f1491ef39be83faf9c59d1e0616a59f78402511b Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Thu, 28 Apr 2022 17:22:52 +0800 Subject: [PATCH] fix: frame total size include header for indices (#4754) (#4767) 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 6df9734e1f8..a0806e2d946 100644 --- a/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.h +++ b/dbms/src/Storages/DeltaMerge/File/DMFilePackFilter.h @@ -234,7 +234,7 @@ class DMFilePackFilter index_buf->seek(dmfile->colIndexOffset(file_name_base)); auto file_size = dmfile->colIndexSize(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 = file_size / frame_total_size + (file_size % frame_total_size != 0); return MinMaxIndex::read(*type, *index_buf, file_size - header_size * frame_count); }