| 4767 | } |
| 4768 | |
| 4769 | void sentinelFailoverSelectSlave(sentinelRedisInstance *ri) { |
| 4770 | sentinelRedisInstance *slave = sentinelSelectSlave(ri); |
| 4771 | |
| 4772 | /* We don't handle the timeout in this state as the function aborts |
| 4773 | * the failover or go forward in the next state. */ |
| 4774 | if (slave == NULL) { |
| 4775 | sentinelEvent(LL_WARNING,"-failover-abort-no-good-slave",ri,"%@"); |
| 4776 | sentinelAbortFailover(ri); |
| 4777 | } else { |
| 4778 | sentinelEvent(LL_WARNING,"+selected-slave",slave,"%@"); |
| 4779 | slave->flags |= SRI_PROMOTED; |
| 4780 | ri->promoted_slave = slave; |
| 4781 | ri->failover_state = SENTINEL_FAILOVER_STATE_SEND_SLAVEOF_NOONE; |
| 4782 | ri->failover_state_change_time = mstime(); |
| 4783 | sentinelEvent(LL_NOTICE,"+failover-state-send-slaveof-noone", |
| 4784 | slave, "%@"); |
| 4785 | } |
| 4786 | } |
| 4787 | |
| 4788 | void sentinelFailoverSendSlaveOfNoOne(sentinelRedisInstance *ri) { |
| 4789 | int retval; |
no test coverage detected