Add a check for missing entity during local alias invalidation. (#14622)
This commit is contained in:
parent
6ca6b028f8
commit
34af6bab1e
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
replication (enterprise): fix panic due to missing entity during invalidation of local aliases.
|
||||||
|
```
|
|
@ -773,6 +773,10 @@ func (i *IdentityStore) Invalidate(ctx context.Context, key string) {
|
||||||
i.logger.Error("failed to fetch entity during local alias invalidation", "entity_id", alias.CanonicalID, "error", err)
|
i.logger.Error("failed to fetch entity during local alias invalidation", "entity_id", alias.CanonicalID, "error", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if entity == nil {
|
||||||
|
i.logger.Error("failed to fetch entity during local alias invalidation, missing entity", "entity_id", alias.CanonicalID, "error", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// Delete local aliases from the entity.
|
// Delete local aliases from the entity.
|
||||||
err = i.deleteAliasesInEntityInTxn(txn, entity, []*identity.Alias{alias})
|
err = i.deleteAliasesInEntityInTxn(txn, entity, []*identity.Alias{alias})
|
||||||
|
|
Loading…
Reference in New Issue