Redis version: 5.0.9
Cluster info: 3 nodes with sentinel. one master, two salve.
on slave:
on master:
Comment From: oranagra
The BITFIELD command is marked as a write command (since it has some write operations too), and that's why it is forbidden on replicas.
In redis 6.2 we introduced BITFIELD_RO, which will be able to run on read-only replica, but i see you're using redis 5.0. you may be able to overcome that by flagging your replica as writable (and making sure never to attempt any write commands on them.
@guybe7 in the light of #9504 maybe we can turn the BITFIELD command as a container and give BITFIELD GET the read flag?
Comment From: guybe7
@oranagra I guess it's possible but tricky since that key is at argv[1] and the subcommand is at argv[2]... the current code doesn't support that
Comment From: oranagra
Ohh right. Well then it's just like other commands with _RO variants.
Comment From: xuyao178
Thanks for your reply. I attempt to modify the redisson/redisson source code,and execute bitfield get command on master. It's worked! Thanks!