Skip to content

Bloom filter bits buffer is not initialized as 0 #3375

@acelyc111

Description

@acelyc111

Describe the bug
I found this bug when I run unit tests in ASAN mode,
TEST_F(BlockBloomFilterTest, SP) in be/test/olap/rowset/segment_v2/block_bloom_filter_test.cpp failed definitely.

$ ${DORIS_TEST_BINARY_DIR}/olap/rowset/segment_v2/block_bloom_filter_test
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from BlockBloomFilterTest
[ RUN      ] BlockBloomFilterTest.Normal
[       OK ] BlockBloomFilterTest.Normal (1 ms)
[ RUN      ] BlockBloomFilterTest.SP
/home/laiyingchun/ap_doris/be/test/olap/rowset/segment_v2/block_bloom_filter_test.cpp:142: Failure
Expected: ((double)false_count2 / (num * 9)) <= (_fpp), actual: 0.312934 vs 0.05
[  FAILED  ] BlockBloomFilterTest.SP (7 ms)
[ RUN      ] BlockBloomFilterTest.slice
[       OK ] BlockBloomFilterTest.slice (1 ms)
[----------] 3 tests from BlockBloomFilterTest (9 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test case ran. (9 ms total)
[  PASSED  ] 2 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] BlockBloomFilterTest.SP

To Reproduce
Steps to reproduce the behavior:

  1. Run unit test ${DORIS_TEST_BINARY_DIR}/olap/rowset/segment_v2/block_bloom_filter_test in ASAN mode for the old unit test code, or in default (release) mode for the improved unit test code in [SegmentV2] Fix bloom filter bits buffer not initialize as 0 #3372.

Expected behavior
All unit tests should passed.
That is to say false positive proportion of bloom filter should be in a very low proportion as what we specify the parameter when we initilize BloomFilter, for example 0.05.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions