HasReplicationSetChangedWithoutState returns false if two replications sets are the same (with possibly different timestamps and instance states), true if they differ in any other way (number of instances, tokens, zones, ...).
(before, after ReplicationSet)
| 161 | // are the same (with possibly different timestamps and instance states), |
| 162 | // true if they differ in any other way (number of instances, tokens, zones, ...). |
| 163 | func HasReplicationSetChangedWithoutState(before, after ReplicationSet) bool { |
| 164 | return hasReplicationSetChangedExcluding(before, after, func(i *InstanceDesc) { |
| 165 | i.Timestamp = 0 |
| 166 | i.State = PENDING |
| 167 | }) |
| 168 | } |
| 169 | |
| 170 | // Do comparison of replicasets, but apply a function first |
| 171 | // to be able to exclude (reset) some values |