Skip to content

The slave node does not need to failover #162

@bbqccx

Description

@bbqccx

When we find that the slave node is abnormally connected or the master node fails and switches to the slave, the slave node will still be added to the failover candidates and failover task process. In fact, the slave does not need to switch; it just needs to prompt for logs indicating the connection exception.

for example:
{"level":"info","timestamp":"2024-04-12T15:12:31.208+0800","caller":"probe/cluster.go:103","msg":"Add the node into the fail over candidates","id":"73o7UbE51haonhk5cr2IkRUVNPUlBIOlGDqam2Kb"
,"role":"slave","addr":"10.1.1.1:9012"}

{"level":"info","timestamp":"2024-04-12T15:12:25.215+0800","caller":"failover/cluster.go:215","msg":"Finish the fail over task","task":{"namespace":"nimtest","cluster":"nimtestkv-2","shard_
idx":6,"node":{"id":"73o7UbE51haonhk5cr2IkRUVNPUlBIOlGDqam2Kb","addr":"10.1.1.1:9012","role":"slave","password":"xxx","created_at":0},"type":1,"probe_count":0,"pending_time":1712905921,"start_time":1712905945,"finish_time":1712905942,"status":3,"error":""}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions