apache / kvrocks-controller

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

suggest to only check old cluster version should not be larger than clusterInfo version. #220

Open greatsharp opened 3 hours ago

greatsharp commented 3 hours ago

https://github.com/apache/kvrocks-controller/blob/2649b8f08c1bbc851509a4f182970d3294216def/store/store.go#L182C1-L186C27

In case of somebody doing cluster operation on nodes side, bypass controller, then the node version will be larger than cluster version in controller.

the equal check will stop the function which update the latest cluster info (fetch by 'clsuter nodes' command) into the controller etcd.

the cluster version is auot increment, so suggest to only check old cluster version should not be larger than clusterInfo version.

greatsharp commented 3 hours ago

the SetCluster method has same check