Skip to content

Commit

Permalink
Fix a bug in TryCatchupWithLeader
Browse files Browse the repository at this point in the history
  • Loading branch information
anand1976 committed Apr 18, 2024
1 parent 44745c2 commit f345b98
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions db/db_impl/db_impl_follower.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ Status DBImplFollower::TryCatchUpWithLeader() {
cfd->imm()->Add(cfd->mem(), &job_context.memtables_to_free);
new_mem->Ref();
cfd->SetMemtable(new_mem);

// This will check if the old memtable is still referenced
cfd->imm()->RemoveOldMemTables(cfd->GetLogNumber(),
&job_context.memtables_to_free);
auto& sv_context = job_context.superversion_contexts.back();
cfd->InstallSuperVersion(&sv_context, &mutex_);
sv_context.NewSuperVersion();
}

// This will check if the old memtable is still referenced
cfd->imm()->RemoveOldMemTables(cfd->GetLogNumber(),
&job_context.memtables_to_free);
auto& sv_context = job_context.superversion_contexts.back();
cfd->InstallSuperVersion(&sv_context, &mutex_);
sv_context.NewSuperVersion();
}
}
}
Expand Down

0 comments on commit f345b98

Please sign in to comment.