Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: sunby <[email protected]>
  • Loading branch information
sunby committed Feb 20, 2025
1 parent fccf4a4 commit f270707
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ INSTALL_PATH := $(PWD)/bin
LIBRARY_PATH := $(PWD)/lib
PGO_PATH := $(PWD)/configs/pgo
OS := $(shell uname -s)
mode = Debug
mode = Release

use_disk_index = OFF
ifdef disk_index
Expand Down
12 changes: 9 additions & 3 deletions internal/core/unittest/test_chunk_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,16 @@ TEST_P(ChunkCacheTest, Read) {

expected_sparse_size += (N + 7) / 8;
expected_sparse_size += sizeof(int64_t) * (N + 1);

if (mmap_enabled) {
const uint32_t page_size = sysconf(_SC_PAGE_SIZE);
auto padding_size = (expected_sparse_size / page_size +
(expected_sparse_size % page_size != 0)) *
page_size -
expected_sparse_size;
expected_sparse_size += padding_size;
}
auto actual_sparse_size = sparse_column->DataByteSize();
std::cout << "actual_sparse_size: " << actual_sparse_size
<< ", expected_sparse_size: " << expected_sparse_size
<< std::endl;
Assert(actual_sparse_size == expected_sparse_size);

cc->Remove(dense_file_name);
Expand Down

0 comments on commit f270707

Please sign in to comment.