Skip to content

Commit

Permalink
add more logs
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Xu <[email protected]>
  • Loading branch information
Qi Xu committed Feb 16, 2024
1 parent 6d6d381 commit b957e9a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions db/db_impl/db_impl_write.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,24 @@ IOStatus DBImpl::WriteToWAL(const WriteThread::WriteGroup& write_group,
stats->AddDBStats(InternalStats::kIntStatsWriteWithWal, write_with_wal);
RecordTick(stats_, WRITE_WITH_WAL, write_with_wal);
}

if (log_writer->get_log_number() != logs_.back().number) {
ROCKS_LOG_INFO(immutable_db_options_.info_log,
"Not writing to latest WAL: [%" PRIu64 ", %" PRIu64 "]",
log_writer->get_log_number(), logs_.back().number);
}
if (!need_log_sync) {
for (auto& log : logs_) {
if (log_writer->get_log_number() == log.number) {
if (log.IsSyncing()) {
ROCKS_LOG_INFO(immutable_db_options_.info_log,
"WAL is being Syncing and writting: [%" PRIu64 "",
log_writer->get_log_number());
}
break;
}
}
}
return io_s;
}

Expand Down

0 comments on commit b957e9a

Please sign in to comment.