summaryrefslogtreecommitdiff
path: root/src/pubsub.c
diff options
context:
space:
mode:
authorzhaozhao.zz <zhaozhao.zz@alibaba-inc.com>2022-05-31 13:55:25 +0800
committerGitHub <noreply@github.com>2022-05-31 08:55:25 +0300
commit805191c791e1f84618c1f69dacec27ac3fecd1e4 (patch)
treec43de169d3bf63379361a0ed58e064ac32fe3961 /src/pubsub.c
parentbb1de082eac26d5242733eb0b40959bd9de2e15b (diff)
downloadredis-805191c791e1f84618c1f69dacec27ac3fecd1e4.tar.gz
rename channel to shardchannel in sharded pubsub commands (#10738)
since the sharded pubsub is different with pubsub, it's better to give users a hint to make it more clear.
Diffstat (limited to 'src/pubsub.c')
-rw-r--r--src/pubsub.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pubsub.c b/src/pubsub.c
index da1bd1fc2..2b063455d 100644
--- a/src/pubsub.c
+++ b/src/pubsub.c
@@ -607,10 +607,10 @@ void pubsubCommand(client *c) {
" Return number of subscriptions to patterns.",
"NUMSUB [<channel> ...]",
" Return the number of subscribers for the specified channels, excluding",
-" pattern subscriptions(default: no channels)."
+" pattern subscriptions(default: no channels).",
"SHARDCHANNELS [<pattern>]",
" Return the currently active shard level channels matching a <pattern> (default: '*').",
-"SHARDNUMSUB [<channel> ...]",
+"SHARDNUMSUB [<shardchannel> ...]",
" Return the number of subscribers for the specified shard level channel(s)",
NULL
};
@@ -642,7 +642,7 @@ NULL
sds pat = (c->argc == 2) ? NULL : c->argv[2]->ptr;
channelList(c,pat,server.pubsubshard_channels);
} else if (!strcasecmp(c->argv[1]->ptr,"shardnumsub") && c->argc >= 2) {
- /* PUBSUB SHARDNUMSUB [Channel_1 ... Channel_N] */
+ /* PUBSUB SHARDNUMSUB [ShardChannel_1 ... ShardChannel_N] */
int j;
addReplyArrayLen(c, (c->argc-2)*2);
@@ -679,7 +679,7 @@ void channelList(client *c, sds pat, dict *pubsub_channels) {
setDeferredArrayLen(c,replylen,mblen);
}
-/* SPUBLISH <channel> <message> */
+/* SPUBLISH <shardchannel> <message> */
void spublishCommand(client *c) {
int receivers = pubsubPublishMessageAndPropagateToCluster(c->argv[1],c->argv[2],1);
if (!server.cluster_enabled)
@@ -687,7 +687,7 @@ void spublishCommand(client *c) {
addReplyLongLong(c,receivers);
}
-/* SSUBSCRIBE channel [channel ...] */
+/* SSUBSCRIBE shardchannel [shardchannel ...] */
void ssubscribeCommand(client *c) {
if (c->flags & CLIENT_DENY_BLOCKING) {
/* A client that has CLIENT_DENY_BLOCKING flag on
@@ -711,7 +711,7 @@ void ssubscribeCommand(client *c) {
}
-/* SUNSUBSCRIBE [channel [channel ...]] */
+/* SUNSUBSCRIBE [shardchannel [shardchannel ...]] */
void sunsubscribeCommand(client *c) {
if (c->argc == 1) {
pubsubUnsubscribeShardAllChannels(c, 1);