mirror of
https://github.com/fluencelabs/redis
synced 2025-04-07 01:51:05 +00:00
Cluster: don't propagate PUBLISH two times.
PUBLISH both published messages via Cluster bus and replication when cluster was enabled, resulting in duplicated message in the slave.
This commit is contained in:
parent
7bf7b7350c
commit
344a065d51
@ -306,7 +306,9 @@ void punsubscribeCommand(redisClient *c) {
|
|||||||
|
|
||||||
void publishCommand(redisClient *c) {
|
void publishCommand(redisClient *c) {
|
||||||
int receivers = pubsubPublishMessage(c->argv[1],c->argv[2]);
|
int receivers = pubsubPublishMessage(c->argv[1],c->argv[2]);
|
||||||
if (server.cluster_enabled) clusterPropagatePublish(c->argv[1],c->argv[2]);
|
if (server.cluster_enabled)
|
||||||
|
clusterPropagatePublish(c->argv[1],c->argv[2]);
|
||||||
|
else
|
||||||
forceCommandPropagation(c,REDIS_PROPAGATE_REPL);
|
forceCommandPropagation(c,REDIS_PROPAGATE_REPL);
|
||||||
addReplyLongLong(c,receivers);
|
addReplyLongLong(c,receivers);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user