google / google/leveldb

In the member function ParseNextKey() of the Block::Ite class in the leveldb/table/block.cc file, the last member variable restart_index_ updated.

Open
#1,138 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.4k
Forks
8.2k
PR merge metrics
No merged PRs in 30d

Description

In the leveldb/table/block.cc file, the member function ParseNextKey() of the Block::Ite class, when updating the member variable restart_index_, the last judgment condition of the while loop (**GetRestartPoint(restart_index_ + 1) < current_**) should be added with an equal sign, right? If the first KV of the restart point is read without the equal sign, the restart_index will not be updated in time, and the second KV must be read to update.

Contributor guide

Open the contributing guide

Research direction

Start in leveldb/table/block.cc at Block::Ite::ParseNextKey() and inspect how restart_index_ is updated by the while-loop condition around GetRestartPoint(restart_index_ + 1) and current_. Verify behavior when the first key at a restart point is read; done means restart_index_ is updated at that point without requiring the next key.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.