Active-replica configuration bug?

We’ve been bitten by positioning active-replica statement at the end of config file instead where it is by default. Everything seemed to behave ok, even the clients seemed like to be able to connect. Still, our application behaved abnormally. Also, the active-replica statement was configured before the replicaof. Our KeyDB version is 6.0.18 (AlmaLinux 8).

Also, the wording on active replica configuration on this issue seems somewhat ambiguous:

Note: When setting up multi-master in a config file, make sure to enable multi-master and active-replica BEFORE setting your replicaof commands, as shown in the examples below, otherwise multi-master replication may not work correctly.

This could be also understood as configuration in steps and not positioning in the configuration file:

  • configure/enable multi-master and active-replica and restart service
  • configure replicaof and restart service

Could someone enlighten me on this topic?

It is talking about the position in the configuration file. So you need to make sure that multi-master and active-replicate are before setting the replicaof in configuration file.

Example:

multi-master yes
active-replica yes

replicaof 10.0.0.2 6379
replicaof 10.0.0.3 6379
replicaof 10.0.0.4 6379

You are right, they should change positions of the example configuration file.

1 Like