Skip to content

Commit

Permalink
[yugabyte#7927] Rename deprecated old-rocksdb-metric-name rocksdb_tot…
Browse files Browse the repository at this point in the history
…al_sst_file_size to rocksdb_current_version_sst_files_size

Summary:
 https://phabricator.dev.yugabyte.com/D6987 from Aug 2019, introduced rocksdb_current_version_sst_files_size metrics. However, for backwards comatibility
 reasons the metric is also exported under the old name: viz: rocksdb_total_sst_file_size

 This diff updates YW to use the new name instead of the old name.

Test Plan:
  eye-ball

Reviewers: timur, daniel, bogdan

Reviewed By: daniel, bogdan

Subscribers: rao, jenkins-bot, ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D11152
  • Loading branch information
amitanandaiyer committed Apr 7, 2021
1 parent db98f76 commit ae6ca18
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cloud/grafana/YugabyteDB.json
Original file line number Diff line number Diff line change
Expand Up @@ -7868,7 +7868,7 @@
"steppedLine": false,
"targets": [
{
"expr": "avg(sum without (table_id, table_name) (rocksdb_total_sst_file_size{node_prefix=\"$dbcluster\"})) / 1073741824",
"expr": "avg(sum without (table_id, table_name) (rocksdb_current_version_sst_files_size{node_prefix=\"$dbcluster\"})) / 1073741824",
"hide": false,
"interval": "",
"legendFormat": "Size of SSTables",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ public boolean disableBackupOnTables(List<UUID> tableUuids, Universe universe) {
private HashMap<String, Double> queryTableSizes(String nodePrefix) {
// Execute query and check for errors.
ArrayList<MetricQueryResponse.Entry> values = metricQueryHelper.queryDirect(
"sum by (table_id) (rocksdb_total_sst_file_size{node_prefix=\"" + nodePrefix + "\"})"
"sum by (table_id) (rocksdb_current_version_sst_files_size{node_prefix=\""
+ nodePrefix + "\"})"
);

HashMap<String, Double> result = new HashMap<String, Double>();
Expand Down
4 changes: 2 additions & 2 deletions managed/src/main/resources/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ lsm_rocksdb_num_seeks_per_node:
"rocksdb_number_db_seek": "Seek"

lsm_rocksdb_total_sst_per_node:
metric: "rocksdb_total_sst_file_size"
metric: "rocksdb_current_version_sst_files_size"
function: "sum without (table_id, table_name)|avg"
operator: "/ 1073741824"
filters:
Expand All @@ -1296,7 +1296,7 @@ lsm_rocksdb_total_sst_per_node:
type: "date"
yaxis:
alias:
"rocksdb_total_sst_file_size": "Size of SSTables"
"rocksdb_current_version_sst_files_size": "Size of SSTables"
ticksuffix: "&nbsp;GB"
tickformat: ".2f"

Expand Down

0 comments on commit ae6ca18

Please sign in to comment.