Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonYao287 committed Aug 27, 2024
1 parent c3008cb commit 8e4c8dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/logstore/log_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,9 @@ bool LogDev::flush() {
return false;
}

// the amount of logs which one logGroup can flush has a upper limit. here we want to make sure all the logs that
// need to be flushed will definitely be flushed to physical dev, so we need this loop to create multiple log groups
// if necessary
for (; m_last_flush_idx < new_idx;) {
LogGroup* lg =
prepare_flush(new_idx - m_last_flush_idx + 4); // Estimate 4 more extra in case of parallel writes
Expand Down

0 comments on commit 8e4c8dd

Please sign in to comment.