apache / kvrocks-controller

Apache Kvrocks Controller is a cluster management tool for Apache Kvrocks.
https://kvrocks.apache.org/
Apache License 2.0
78 stars 42 forks source link

The slave node does not need to failover #162

Closed bbqccx closed 2 months ago

bbqccx commented 2 months ago

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":""}}

git-hulk commented 2 months ago

@bbqccx Thanks for your feedback.