Improper condition test in FilterBlockReader::KeyMayMatch
Open
bug
- Dominant language
- C++
- Stars
- 39.4k
- Forks
- 8.2k
- PR merge metrics
- No merged PRs in 30d
Description
Original [issue 165](https://code.google.com/p/leveldb/issues/detail?id=165) created by alghak on 2013-05-06T13:37:06.000Z:
In FilterBlockReader::KeyMayMatch(), the `else if (start == limit)` branch never get executed even when `start == limit`. The flow control always goes into the `if` branch because of the `start <= limit` condition test.
When met with empty filter, it's not necessary to call `policy_->KeyMayMatch` at all.
Contributor guide
Assessment
This issue has not been assessed yet.