diff --git a/sentinel.conf b/sentinel.conf index 3cd1bb8c59..f44c116eff 100644 --- a/sentinel.conf +++ b/sentinel.conf @@ -347,7 +347,7 @@ SENTINEL resolve-hostnames no # SENTINEL announce-hostnames no -# When primary_reboot_down_after_period is set to 0, Sentinel does not fail over +# When primary-reboot-down-after-period is set to 0, Sentinel does not fail over # when receiving a -LOADING response from a primary. This was the only supported # behavior before Redis OSS 7.0. # diff --git a/tests/sentinel/tests/12-master-reboot.tcl b/tests/sentinel/tests/12-master-reboot.tcl index 101b37f601..3d7c7c6ecb 100644 --- a/tests/sentinel/tests/12-master-reboot.tcl +++ b/tests/sentinel/tests/12-master-reboot.tcl @@ -47,9 +47,11 @@ test "Primary reboot in very short time" { R $master_id config rewrite foreach_sentinel_id id { - S $id SENTINEL SET mymaster primary-reboot-down-after-period 5000 - S $id sentinel debug ping-period 500 - S $id sentinel debug ask-period 500 + foreach role {master primary} { + S $id SENTINEL SET mymaster $role-reboot-down-after-period 5000 + S $id sentinel debug ping-period 500 + S $id sentinel debug ask-period 500 + } } kill_instance valkey $master_id @@ -76,38 +78,6 @@ test "Primary reboot in very short time" { break } } - - # Check the master-reboot-down-after-period still works - foreach_sentinel_id id { - S $id SENTINEL SET mymaster master-reboot-down-after-period 5000 - S $id sentinel debug ping-period 500 - S $id sentinel debug ask-period 500 - } - - kill_instance valkey $master_id - reboot_instance valkey $master_id - - foreach_sentinel_id id { - wait_for_condition 1000 100 { - [lindex [S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster] 1] != $old_port - } else { - fail "At least one Sentinel did not receive failover info" - } - } - - set addr [S 0 SENTINEL GET-MASTER-ADDR-BY-NAME mymaster] - set master_id [get_instance_id_by_port valkey [lindex $addr 1]] - - # Make sure the instance load all the dataset - while 1 { - catch {[$link ping]} retval - if {[string match {*LOADING*} $retval]} { - after 100 - continue - } else { - break - } - } } test "New primary [join $addr {:}] role matches" {