apache / rocketmq-operator

Apache RocketMQ Operator
https://rocketmq.apache.org/
Apache License 2.0
310 stars 126 forks source link

[ISSUE #120] fix(nameservice): add sorting for hostIps and instance.Status.NameServers before deepEqual #104

Closed shangjin92 closed 2 years ago

shangjin92 commented 2 years ago

Sometimes, hostsIps are equal to instance.Status.NameServers, just the order of value is different. But reflect.DeepEqual will return false to this situation, and it will update nameservices always.

For example, hostIps = ['192.168.2.1', '192.168.2.11'], instance.Status.NameServers = ['192.168.2.11', '192.168.2.1']

caigy commented 2 years ago

@shangjin92 Pls submit an issue and relate this pr to it.

shangjin92 commented 2 years ago

fix #120