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

WriteController: Remove redundant setting delay reports with single db #831

Merged
merged 5 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
### Bug Fixes

### Miscellaneous
* WriteController logging: Remove redundant reports when WC is not shared between dbs


## Incaberry 2.8.0 (31/1/2024)
Based on RocksDB 8.6.7
Expand Down
10 changes: 5 additions & 5 deletions db/column_family.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1123,8 +1123,8 @@ WriteStallCondition ColumnFamilyData::RecalculateWriteStallConditions(
ROCKS_LOG_WARN(
ioptions_.logger,
"[%s] Stalling writes because we have %d immutable memtables "
"(waiting for flush), max_write_buffer_number is set to %d "
"rate %" PRIu64,
"(waiting for flush), max_write_buffer_number is set to %d. "
"delayed write rate: %" PRIu64,
name_.c_str(), imm()->NumNotFlushed(),
mutable_cf_options.max_write_buffer_number,
write_controller->delayed_write_rate());
Expand All @@ -1146,8 +1146,8 @@ WriteStallCondition ColumnFamilyData::RecalculateWriteStallConditions(
1);
}
ROCKS_LOG_WARN(ioptions_.logger,
"[%s] Stalling writes because we have %d level-0 files "
"rate %" PRIu64,
"[%s] Stalling writes because we have %d level-0 files. "
"delayed write rate: %" PRIu64,
name_.c_str(), vstorage->l0_delay_trigger_count(),
write_controller->delayed_write_rate());
} else if (write_stall_condition == WriteStallCondition::kDelayed &&
Expand Down Expand Up @@ -1175,7 +1175,7 @@ WriteStallCondition ColumnFamilyData::RecalculateWriteStallConditions(
ROCKS_LOG_WARN(
ioptions_.logger,
"[%s] Stalling writes because of estimated pending compaction "
"bytes %" PRIu64 " rate %" PRIu64,
"bytes %" PRIu64 ". delayed write rate: %" PRIu64,
name_.c_str(), vstorage->estimated_compaction_needed_bytes(),
write_controller->delayed_write_rate());
} else {
Expand Down
4 changes: 4 additions & 0 deletions db/write_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ void WriteController::HandleNewDelayReq(void* client_id,

{
std::lock_guard<std::mutex> logger_lock(loggers_map_mu_);
// The below WARN msg is intended only when the WC is shared among loggers.
if (loggers_to_client_ids_map_.size() == 1) {
return;
}
for (auto& logger_and_clients : loggers_to_client_ids_map_) {
ROCKS_LOG_WARN(logger_and_clients.first.get(),
"WC setting delay of %" PRIu64
Expand Down
Loading