Skip to content

Commit

Permalink
Addressed comments
Browse files Browse the repository at this point in the history
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
akankshamahajan15 committed Nov 24, 2023
1 parent 85ea012 commit 0aa55ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion file/file_prefetch_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,11 @@ void FilePrefetchBuffer::ReadAheadSizeTuning(
assert(updated_start_offset < updated_end_offset);

if (!read_curr_block) {
// Handle the case when callback added block handles which are already
// prefetched and nothing new needs to be prefetched. In that case end
// offset updated by callback will be less than prev_buf_end_offset which
// means data has been already prefetched.
if (updated_end_offset <= prev_buf_end_offset) {
// It can be when this callback only added previous block handles.
start_offset = end_offset = prev_buf_end_offset;
return;
}
Expand Down
4 changes: 1 addition & 3 deletions table/table_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1128,9 +1128,7 @@ class BlockBasedTableTest
virtual public ::testing::WithParamInterface<uint32_t> {
public:
BlockBasedTableTest() : format_(GetParam()) {
std::unique_ptr<Env> env(
new CompositeEnvWrapper(Env::Default(), FileSystem::Default()));
env_ = env.get();
env_ = Env::Default();
}

BlockBasedTableOptions GetBlockBasedTableOptions() {
Expand Down

0 comments on commit 0aa55ec

Please sign in to comment.