You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the member function ParseNextKey() of the Block::Ite class in the leveldb/table/block.cc file, the last member variable restart_index_ updated.
#1138
Open
LunarStore opened this issue
Aug 4, 2023
· 1 comment
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.
The text was updated successfully, but these errors were encountered:
Yes, you are right! The restart_index is not be updated in time for the first entry, but I found it had little effect.
I'm not sure if introduce any new bugs when we make changes to this condition (GetRestartPoint(restart_index_ + 1) < current_). Perhaps you can run some tests to verify that it is correct and create a PR.
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.
The text was updated successfully, but these errors were encountered: