Skip to content

Commit

Permalink
fix grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
lidezhu committed Jun 8, 2023
1 parent 06c1d02 commit 6d6b130
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dbms/src/Common/CurrentMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
M(PSMVCCSnapshotsList) \
M(PSMVCCNumDelta) \
M(PSMVCCNumBase) \
M(PSPendingWriterSize) \
M(PSPendingWriterNum) \
M(RWLockWaitingReaders) \
M(RWLockWaitingWriters) \
M(RWLockActiveReaders) \
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Storages/Page/V3/PageDirectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
namespace CurrentMetrics
{
extern const Metric PSMVCCSnapshotsList;
extern const Metric PSPendingWriterSize;
extern const Metric PSPendingWriterNum;
} // namespace CurrentMetrics

namespace DB
Expand Down Expand Up @@ -1481,7 +1481,7 @@ std::unordered_set<String> PageDirectory<Trait>::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;

Expand Down
2 changes: 1 addition & 1 deletion metrics/grafana/tiflash_summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down

0 comments on commit 6d6b130

Please sign in to comment.