Skip to content

Commit 42b5494

Browse files
pdillingerfacebook-github-bot
authored andcommitted
Fix BloomFilterPolicy changes for unsigned char (ARM) (#6024)
Summary: Bug in PR #5941 when char is unsigned that should only affect assertion on unused/invalid filter metadata. Pull Request resolved: #6024 Test Plan: on ARM: ./bloom_test && ./db_bloom_filter_test && ./block_based_filter_block_test && ./full_filter_block_test && ./partitioned_filter_block_test Differential Revision: D18461206 Pulled By: pdillinger fbshipit-source-id: 68a7c813a0b5791c05265edc03cdf52c78880e9a
1 parent 6c7b1a0 commit 42b5494

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

table/block_based/filter_policy.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ FilterBitsReader* BloomFilterPolicy::GetFilterBitsReader(
338338
return new AlwaysFalseFilter();
339339
}
340340

341-
char raw_num_probes = contents.data()[len_with_meta - 5];
341+
int8_t raw_num_probes =
342+
static_cast<int8_t>(contents.data()[len_with_meta - 5]);
342343
// NB: *num_probes > 30 and < 128 probably have not been used, because of
343344
// BloomFilterPolicy::initialize, unless directly calling
344345
// FullFilterBitsBuilder as an API, but we are leaving those cases in

0 commit comments

Comments
 (0)