From fa3fbf5345e13f23b87d6d702e8a41a8fddb0120 Mon Sep 17 00:00:00 2001 From: heyuchen Date: Mon, 30 Aug 2021 12:53:41 +0800 Subject: [PATCH 1/3] feat(split): add table level split reject counters --- rdsn | 2 +- src/server/info_collector.cpp | 2 ++ src/server/info_collector.h | 4 ++++ src/shell/command_helper.h | 8 ++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/rdsn b/rdsn index 2b7cbf5294..298ef7eb66 160000 --- a/rdsn +++ b/rdsn @@ -1 +1 @@ -Subproject commit 2b7cbf5294fbfd05b0b3eda68a60292916cb6370 +Subproject commit 298ef7eb660235b461d36d6582ec3a1c7ffa865f diff --git a/src/server/info_collector.cpp b/src/server/info_collector.cpp index c7f2a84d94..601bf517e9 100644 --- a/src/server/info_collector.cpp +++ b/src/server/info_collector.cpp @@ -220,6 +220,8 @@ info_collector::app_stat_counters *info_collector::get_app_counters(const std::s INIT_COUNTER(recent_read_throttling_reject_count); INIT_COUNTER(recent_backup_request_throttling_delay_count); INIT_COUNTER(recent_backup_request_throttling_reject_count); + INIT_COUNTER(recent_write_splitting_reject_count); + INIT_COUNTER(recent_read_splitting_reject_count); INIT_COUNTER(storage_mb); INIT_COUNTER(storage_count); INIT_COUNTER(rdb_block_cache_hit_rate); diff --git a/src/server/info_collector.h b/src/server/info_collector.h index a9e8ab0ef7..a077cd4a42 100644 --- a/src/server/info_collector.h +++ b/src/server/info_collector.h @@ -80,6 +80,8 @@ class info_collector row_stats.recent_backup_request_throttling_delay_count); recent_backup_request_throttling_reject_count->set( row_stats.recent_backup_request_throttling_reject_count); + recent_write_splitting_reject_count->set(row_stats.recent_write_splitting_reject_count); + recent_read_splitting_reject_count->set(row_stats.recent_read_splitting_reject_count); storage_mb->set(row_stats.storage_mb); storage_count->set(row_stats.storage_count); rdb_block_cache_hit_rate->set(convert_to_1M_ratio( @@ -149,6 +151,8 @@ class info_collector ::dsn::perf_counter_wrapper recent_read_throttling_reject_count; ::dsn::perf_counter_wrapper recent_backup_request_throttling_delay_count; ::dsn::perf_counter_wrapper recent_backup_request_throttling_reject_count; + ::dsn::perf_counter_wrapper recent_write_splitting_reject_count; + ::dsn::perf_counter_wrapper recent_read_splitting_reject_count; ::dsn::perf_counter_wrapper storage_mb; ::dsn::perf_counter_wrapper storage_count; ::dsn::perf_counter_wrapper rdb_block_cache_hit_rate; diff --git a/src/shell/command_helper.h b/src/shell/command_helper.h index c6364a413b..fd80f1d561 100644 --- a/src/shell/command_helper.h +++ b/src/shell/command_helper.h @@ -627,6 +627,8 @@ struct row_data row.recent_backup_request_throttling_delay_count; recent_backup_request_throttling_reject_count += row.recent_backup_request_throttling_reject_count; + recent_write_splitting_reject_count += row.recent_write_splitting_reject_count; + recent_read_splitting_reject_count += row.recent_read_splitting_reject_count; storage_mb += row.storage_mb; storage_count += row.storage_count; rdb_block_cache_hit_count += row.rdb_block_cache_hit_count; @@ -684,6 +686,8 @@ struct row_data double recent_read_throttling_reject_count = 0; double recent_backup_request_throttling_delay_count = 0; double recent_backup_request_throttling_reject_count = 0; + double recent_write_splitting_reject_count = 0; + double recent_read_splitting_reject_count = 0; double storage_mb = 0; double storage_count = 0; double rdb_block_cache_hit_count = 0; @@ -766,6 +770,10 @@ update_app_pegasus_perf_counter(row_data &row, const std::string &counter_name, row.recent_backup_request_throttling_delay_count += value; else if (counter_name == "recent.backup.request.throttling.reject.count") row.recent_backup_request_throttling_reject_count += value; + else if (counter_name == "recent.write.splitting.reject.count") + row.recent_write_splitting_reject_count += value; + else if (counter_name == "recent.read.splitting.reject.count") + row.recent_read_splitting_reject_count += value; else if (counter_name == "disk.storage.sst(MB)") row.storage_mb += value; else if (counter_name == "disk.storage.sst.count") From b2fc192e09ca4fc5a35768770bbe95a0cf60bbc3 Mon Sep 17 00:00:00 2001 From: heyuchen Date: Mon, 30 Aug 2021 16:51:30 +0800 Subject: [PATCH 2/3] update rdsn --- rdsn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdsn b/rdsn index 298ef7eb66..6135e4596a 160000 --- a/rdsn +++ b/rdsn @@ -1 +1 @@ -Subproject commit 298ef7eb660235b461d36d6582ec3a1c7ffa865f +Subproject commit 6135e4596a36bb7d303a8703f6c4ab15a14fedb8 From 8e370f07cbe6a9d7079a542082b64b67fc89077e Mon Sep 17 00:00:00 2001 From: heyuchen Date: Mon, 30 Aug 2021 17:25:30 +0800 Subject: [PATCH 3/3] small fix --- src/shell/commands/table_management.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shell/commands/table_management.cpp b/src/shell/commands/table_management.cpp index 272b5d89b9..1c746491e7 100644 --- a/src/shell/commands/table_management.cpp +++ b/src/shell/commands/table_management.cpp @@ -511,6 +511,8 @@ bool app_stat(command_executor *e, shell_context *sc, arguments args) row.recent_backup_request_throttling_delay_count; sum.recent_backup_request_throttling_reject_count += row.recent_backup_request_throttling_reject_count; + sum.recent_write_splitting_reject_count += row.recent_write_splitting_reject_count; + sum.recent_read_splitting_reject_count += row.recent_read_splitting_reject_count; sum.storage_mb += row.storage_mb; sum.storage_count += row.storage_count; sum.rdb_block_cache_hit_count += row.rdb_block_cache_hit_count;