Properly invalidate group alias in a secondary (#6564)

This commit is contained in:
Vishal Nayak 2019-04-10 16:14:31 -04:00 committed by GitHub
parent 99592b983b
commit 0df2d14961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -207,6 +207,14 @@ func (i *IdentityStore) Invalidate(ctx context.Context, key string) {
i.logger.Error("failed to delete group from MemDB", "group_id", group.ID, "error", err)
return
}
if group.Alias != nil {
err := i.MemDBDeleteAliasByIDInTxn(txn, group.Alias.ID, true)
if err != nil {
i.logger.Error("failed to delete group alias from MemDB", "error", err)
return
}
}
}
// Get the storage bucket entry