Describe the bug

execute PUBLISH always return 0

To reproduce

  1. subscribe on node1
127.0.0.1:6380> SUBSCRIBE test
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "test"
3) (integer) 1
  1. publish on node2
127.0.0.1:6381> PUBLISH test 123
(integer) 0
  1. node1 received message
127.0.0.1:6380> SUBSCRIBE test
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "test"
3) (integer) 1
1) "message"
2) "test"
3) "123"

Expected behavior

PUBLISH return 1.

127.0.0.1:6381> PUBLISH test 123
(integer) 1

Additional information info

127.0.0.1:6380> info
# Server
redis_version:5.0.5
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:4d0898999c5f857
redis_mode:cluster
os:Linux 4.4.0-142-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:6.3.0
process_id:1
run_id:ae0928686497e04a91c0dd8963418dd63329ed23
tcp_port:6380
uptime_in_seconds:1723
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:10119395
executable:/data/redis-server
config_file:/usr/local/etc/redis/redis.conf

Comment From: itamarhaber

Hello @zhou-hao

I'm not sure that this is a real bug, perhaps more of a documentation issue. This is expected, even if not documented properly, given the current design and implementation of the cluster's Pub/Sub.

Please review this PR and lmk if it helps: https://github.com/redis/redis-doc/pull/1425

Comment From: zhou-hao

emmm, ok !