From 6d6b130a637e74ce1eef049b371646c134346674 Mon Sep 17 00:00:00 2001 From: lidezhu Date: Thu, 8 Jun 2023 18:26:00 +0800 Subject: [PATCH] fix grafana --- dbms/src/Common/CurrentMetrics.cpp | 2 +- dbms/src/Storages/Page/V3/PageDirectory.cpp | 4 ++-- metrics/grafana/tiflash_summary.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dbms/src/Common/CurrentMetrics.cpp b/dbms/src/Common/CurrentMetrics.cpp index 9d939a43907..a476f06c9b0 100644 --- a/dbms/src/Common/CurrentMetrics.cpp +++ b/dbms/src/Common/CurrentMetrics.cpp @@ -28,7 +28,7 @@ M(PSMVCCSnapshotsList) \ M(PSMVCCNumDelta) \ M(PSMVCCNumBase) \ - M(PSPendingWriterSize) \ + M(PSPendingWriterNum) \ M(RWLockWaitingReaders) \ M(RWLockWaitingWriters) \ M(RWLockActiveReaders) \ diff --git a/dbms/src/Storages/Page/V3/PageDirectory.cpp b/dbms/src/Storages/Page/V3/PageDirectory.cpp index b84ae0fe49f..10eb48abb37 100644 --- a/dbms/src/Storages/Page/V3/PageDirectory.cpp +++ b/dbms/src/Storages/Page/V3/PageDirectory.cpp @@ -50,7 +50,7 @@ namespace CurrentMetrics { extern const Metric PSMVCCSnapshotsList; -extern const Metric PSPendingWriterSize; +extern const Metric PSPendingWriterNum; } // namespace CurrentMetrics namespace DB @@ -1481,7 +1481,7 @@ std::unordered_set PageDirectory::apply(PageEntriesEdit && edit, // Note that, as read threads use current `sequence` as read_seq, we cannot increase `sequence` // before applying edit to `mvcc_table_directory`. GET_METRIC(tiflash_storage_page_command_count, type_write).Increment(); - CurrentMetrics::Increment pending_writer_size{CurrentMetrics::PSPendingWriterSize}; + CurrentMetrics::Increment pending_writer_size{CurrentMetrics::PSPendingWriterNum}; Writer w; w.edit = &edit; diff --git a/metrics/grafana/tiflash_summary.json b/metrics/grafana/tiflash_summary.json index fedb8fc69d2..02fbc4b018c 100644 --- a/metrics/grafana/tiflash_summary.json +++ b/metrics/grafana/tiflash_summary.json @@ -9619,7 +9619,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(tiflash_system_current_metric_PSPendingWriterSize{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}) by (instance)", + "expr": "sum(tiflash_system_current_metric_PSPendingWriterNum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}) by (instance)", "format": "time_series", "hide": false, "interval": "",