Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write Flow: Reduce debug logs (#461) #472

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions db/db_impl/db_spdb_impl_write.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,8 @@ void SpdbWriteImpl::PublishedSeq() {
}
}
if (published_seq != 0) {
ROCKS_LOG_INFO(db_->immutable_db_options().info_log,
"PublishedSeq %" PRIu64, published_seq);

/*ROCKS_LOG_INFO(db_->immutable_db_options().info_log,
"PublishedSeq %" PRIu64, published_seq);*/
db_->SetLastSequence(published_seq);
}
}
Expand All @@ -279,10 +278,10 @@ void SpdbWriteImpl::SwitchAndWriteBatchGroup(WritesBatchList* batch_group) {

wal_write_mutex_.Lock();
SwitchBatchGroupIfNeeded();
ROCKS_LOG_INFO(db_->immutable_db_options().info_log,
/*ROCKS_LOG_INFO(db_->immutable_db_options().info_log,
"SwitchBatchGroup last batch group with %d batches and with "
"publish seq %" PRIu64,
batch_group->elements_num_, batch_group->GetMaxSeq());
batch_group->elements_num_, batch_group->GetMaxSeq());*/

if (!batch_group->wal_writes_.empty()) {
auto const& immutable_db_options = db_->immutable_db_options();
Expand Down Expand Up @@ -360,9 +359,9 @@ void SpdbWriteImpl::SwitchAndWriteBatchGroup(WritesBatchList* batch_group) {
}

batch_group->WriteBatchComplete(true);
ROCKS_LOG_INFO(db_->immutable_db_options().info_log,
/*ROCKS_LOG_INFO(db_->immutable_db_options().info_log,
"Complete batch group with publish seq %" PRIu64,
batch_group->GetMaxSeq());
batch_group->GetMaxSeq());*/

PublishedSeq();
}
Expand Down Expand Up @@ -438,16 +437,16 @@ IOStatus DBImpl::SpdbSyncWAL(uint64_t offset, uint64_t size) {
InstrumentedMutexLock l(&log_write_mutex_);
log::Writer* log_writer = logs_.back().writer;
io_s = log_writer->SyncRange(immutable_db_options_.use_fsync, offset, size);
ROCKS_LOG_INFO(immutable_db_options().info_log,
/*ROCKS_LOG_INFO(immutable_db_options().info_log,
"Complete SyncRange offset %" PRIu64 " size %" PRIu64,
offset, size);
offset, size);*/
}
if (io_s.ok() && !log_dir_synced_) {
io_s = directories_.GetWalDir()->FsyncWithDirOptions(
IOOptions(), nullptr,
DirFsyncOptions(DirFsyncOptions::FsyncReason::kNewFileSynced));
log_dir_synced_ = true;
ROCKS_LOG_INFO(immutable_db_options().info_log, "Complete Sync dir");
/*ROCKS_LOG_INFO(immutable_db_options().info_log, "Complete Sync dir");*/
}
return io_s;
}
Expand Down