Skip to content

Commit

Permalink
added 'kphp_confdata_update_timeouts' statshouse metric
Browse files Browse the repository at this point in the history
  • Loading branch information
DrDet committed Dec 9, 2023
1 parent 9322ce6 commit 4d61d75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions server/confdata-binlog-replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ class ConfdataBinlogReplayer : vk::binlog::replayer {

// null is inserted by the default
if (first_key_it->second.is_null()) {
if (memory_status == MemoryStatus::SOFT_OOM) {
if (memory_status == MemoryStatus::SOFT_OOM) { // todo: unreachable?
first_key_it->second = array<mixed>{}; // to fit asserts that it's array
return OperationStatus::throttled_out;
}
Expand Down Expand Up @@ -1023,7 +1023,6 @@ bool update_confdata_state_from_binlog(bool is_initial_reading, double timeout_s
bool ok = confdata_binlog_replayer.on_finish_update_cycle();

if (!ok) {
// TODO: critical?
log_server_warning("Confdata binlog %supdate timeout %f sec expired", is_initial_reading ? "initial " : "", timeout_sec);
}
return ok;
Expand Down
3 changes: 2 additions & 1 deletion server/statshouse/statshouse-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ void StatsHouseManager::add_confdata_master_stats(const ConfdataStats &confdata_
client.metric("kphp_confdata_events").tag("delete").write_value(events.delete_events.total);
client.metric("kphp_confdata_events").tag("delete_blacklisted").write_value(events.delete_events.blacklisted);
client.metric("kphp_confdata_events").tag("throttled_out").write_value(events.throttled_out_total_events);
client.metric("kphp_confdata_events").tag("timed_out").write_value(events.update_timeouts_total);

client.metric("kphp_confdata_update_timeouts").write_value(events.update_timeouts_total);

for (const auto &[section_name, size] : confdata_stats.heaviest_sections_by_count.sorted_desc) {
if (section_name != nullptr && size > 0) { // section_name looks like "highload."
Expand Down

0 comments on commit 4d61d75

Please sign in to comment.