Skip to content

Commit

Permalink
add log for the first write
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Xu <[email protected]>
  • Loading branch information
Qi Xu committed Mar 14, 2024
1 parent e0ca53a commit 1e78d43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion db/db_impl/db_impl_write.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,11 @@ IOStatus DBImpl::WriteToWAL(const WriteBatch& merged_batch,
uint64_t* log_size,
LogFileNumberSize& log_file_number_size) {
assert(log_size != nullptr);

if (log_writer->file()->GetFileSize() == 0) {
ROCKS_LOG_INFO(immutable_db_options_.info_log,
"Start writing to WAL: [%" PRIu64 "]",
log_writer->get_log_number());
}
Slice log_entry = WriteBatchInternal::Contents(&merged_batch);
*log_size = log_entry.size();
// When two_write_queues_ WriteToWAL has to be protected from concurretn calls
Expand Down

0 comments on commit 1e78d43

Please sign in to comment.