提交 90d83550 编写于 作者: X xiusir 提交者: Facebook Github Bot

Fix the wrong address for PREFETCH in DynamicBloom::Prefetch

Summary:
- Change data_[b] to data_[b / 8] in DynamicBloom::Prefetch, as b means the b-th bit in data_ and data_[b / 8] is the proper byte in data_.
Closes https://github.com/facebook/rocksdb/pull/1935

Differential Revision: D4628696

Pulled By: siying

fbshipit-source-id: bc5a0c6
上级 08864df2
......@@ -128,7 +128,7 @@ inline bool DynamicBloom::MayContain(const Slice& key) const {
inline void DynamicBloom::Prefetch(uint32_t h) {
if (kNumBlocks != 0) {
uint32_t b = ((h >> 11 | (h << 21)) % kNumBlocks) * (CACHE_LINE_SIZE * 8);
PREFETCH(&(data_[b]), 0, 3);
PREFETCH(&(data_[b / 8]), 0, 3);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册