MT#65243 Plugin::NGCP::Redis handle 'active-replica' state

* Catalyst::Plugin::NGCP::Redis::_wait_for_master_role() only
  expected the 'master' value to be considered as OK, whereas
  with Redis/KeyDB the value can be also 'active-replica'.
  Therefore, consider both 'master' and 'active-replica' values
  as OK.

Change-Id: I16a0657a3a78a2f2b3c892c21ce0d9d6ebec0a0c
(cherry picked from commit 5d7e137ec9)
(cherry picked from commit 2c1c0642ed)
mr13.5.1
Kirill Solomko 2 months ago
parent 6940053d17
commit d1ef649bb0

@ -50,7 +50,8 @@ sub _wait_for_master_role {
my $wait = 5;
while ($cnt < $wait) {
return 1 if _get_replication_role($conn_ref) eq 'master';
my $repl_role = _get_replication_role($conn_ref);
return 1 if $repl_role =~ /^(master|active-replica)$/;
sleep $interval;
$cnt += $interval;
}

Loading…
Cancel
Save