diff --git a/HISTORY.md b/HISTORY.md index 0f6a749d9..a80bd9ca6 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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 diff --git a/db/column_family.cc b/db/column_family.cc index 7be55f556..1d8e7499e 100644 --- a/db/column_family.cc +++ b/db/column_family.cc @@ -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()); @@ -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 && @@ -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 { diff --git a/db/write_controller.cc b/db/write_controller.cc index 64e4acd5a..ce5487d6f 100644 --- a/db/write_controller.cc +++ b/db/write_controller.cc @@ -149,6 +149,10 @@ void WriteController::HandleNewDelayReq(void* client_id, { std::lock_guard 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