mirror of https://github.com/status-im/consul.git
Fix check deletion in anti-entropy sync (#7690)
* Incorporate entMeta into service equality check
This commit is contained in:
parent
59a606e938
commit
3956cff60f
|
@ -1098,8 +1098,11 @@ func (l *State) deleteService(key structs.ServiceID) error {
|
||||||
delete(l.services, key)
|
delete(l.services, key)
|
||||||
// service deregister also deletes associated checks
|
// service deregister also deletes associated checks
|
||||||
for _, c := range l.checks {
|
for _, c := range l.checks {
|
||||||
if c.Deleted && c.Check != nil && c.Check.ServiceID == key.ID {
|
if c.Deleted && c.Check != nil {
|
||||||
l.pruneCheck(c.Check.CompoundCheckID())
|
sid := c.Check.CompoundServiceID()
|
||||||
|
if sid.Matches(&key) {
|
||||||
|
l.pruneCheck(c.Check.CompoundCheckID())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
l.logger.Info("Deregistered service", "service", key.ID)
|
l.logger.Info("Deregistered service", "service", key.ID)
|
||||||
|
|
Loading…
Reference in New Issue