Unverified Commit 0132ed75 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Add pubsubshard_channels field in INFO STATS (#10929)

We already have `pubsub_channels` and `pubsub_patterns`
in INFO stats, now add `pubsubshard_channels` (symmetry).

Sharded pubsub was added in #8621
parent 45ae6053
...@@ -5661,6 +5661,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) { ...@@ -5661,6 +5661,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) {
"keyspace_misses:%lld\r\n" "keyspace_misses:%lld\r\n"
"pubsub_channels:%ld\r\n" "pubsub_channels:%ld\r\n"
"pubsub_patterns:%lu\r\n" "pubsub_patterns:%lu\r\n"
"pubsubshard_channels:%lu\r\n"
"latest_fork_usec:%lld\r\n" "latest_fork_usec:%lld\r\n"
"total_forks:%lld\r\n" "total_forks:%lld\r\n"
"migrate_cached_sockets:%ld\r\n" "migrate_cached_sockets:%ld\r\n"
...@@ -5710,6 +5711,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) { ...@@ -5710,6 +5711,7 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) {
server.stat_keyspace_misses, server.stat_keyspace_misses,
dictSize(server.pubsub_channels), dictSize(server.pubsub_channels),
dictSize(server.pubsub_patterns), dictSize(server.pubsub_patterns),
dictSize(server.pubsubshard_channels),
server.stat_fork_time, server.stat_fork_time,
server.stat_total_forks, server.stat_total_forks,
dictSize(server.migrate_cached_sockets), dictSize(server.migrate_cached_sockets),
......
...@@ -1858,7 +1858,7 @@ struct redisServer { ...@@ -1858,7 +1858,7 @@ struct redisServer {
dict *pubsub_patterns; /* A dict of pubsub_patterns */ dict *pubsub_patterns; /* A dict of pubsub_patterns */
int notify_keyspace_events; /* Events to propagate via Pub/Sub. This is an int notify_keyspace_events; /* Events to propagate via Pub/Sub. This is an
xor of NOTIFY_... flags. */ xor of NOTIFY_... flags. */
dict *pubsubshard_channels; /* Map channels to list of subscribed clients */ dict *pubsubshard_channels; /* Map shard channels to list of subscribed clients */
/* Cluster */ /* Cluster */
int cluster_enabled; /* Is cluster enabled? */ int cluster_enabled; /* Is cluster enabled? */
int cluster_port; /* Set the cluster port for a node. */ int cluster_port; /* Set the cluster port for a node. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment