1f8ade6bd6
Summary: In talbe.cc, when reading the metablock, it uses BytewiseComparator(); However in table_builder.cc, we use r->options.comparator. After tracing the creation of r->options.comparator, I found this comparator is an InternalKeyComparator, which wraps the user defined comparator(details can be found in DBImpl::SanitizeOptions(). I encountered this problem when adding metadata about "bloom filter" before. With different comparator, we may fail to do the binary sort. Current code works well since there is only one entry in meta block. Test Plan: make all check I've also tested this change in https://reviews.facebook.net/D8283 before. Reviewers: dhruba, haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D13335 |
||
---|---|---|
.. | ||
block_builder.cc | ||
block_builder.h | ||
block_test.cc | ||
block.cc | ||
block.h | ||
filter_block_test.cc | ||
filter_block.cc | ||
filter_block.h | ||
format.cc | ||
format.h | ||
iter_heap.h | ||
iterator_wrapper.h | ||
iterator.cc | ||
merger.cc | ||
merger.h | ||
table_builder.cc | ||
table_test.cc | ||
table.cc | ||
table.h | ||
two_level_iterator.cc | ||
two_level_iterator.h |