-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LinkCompaction: Add Link Compaction related interfaces #232
base: link-compaction
Are you sure you want to change the base?
Conversation
907db3e
to
0bb114e
Compare
0bb114e
to
6ce5863
Compare
6ce5863
to
c9dd2ff
Compare
de060ed
to
33ea11e
Compare
should we add some simple unit tests? |
This is not an official MR, I will re-submit a standard MR with enough UT sooner after we finished all critical logic. |
33ea11e
to
d9e6677
Compare
table/two_level_iterator.cc
Outdated
} | ||
|
||
// Seek all iterators to their first item. | ||
Status SeekToFirst() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SeekToFirst/Seek...这些建议放在一个单独的LinkBlockIterator类中
table/two_level_iterator.cc
Outdated
// position `idx`, fill all touched keys into the key buffer. | ||
auto it = iterator_cache_->GetIterator(file_number); | ||
it->SeekForPrev(max_key_); | ||
assert(it->status().ok()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不能assert,建议失败的状态需要返回出去
table/two_level_iterator.cc
Outdated
// TODO Shall we init all other iterators to the right place so we can | ||
// reuse them in later Next()/Prev()? | ||
auto it = iterator_cache_->GetIterator(file_numbers_[iter_idx]); | ||
it->Seek(target); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最后这一次file seek的开销是否可以去掉?在buffered_key的过程中已经把相应的file通过SeekForPrev+Prev走到了正确的位置了
3ed371c
to
ff8e329
Compare
No description provided.