i.logger.Warn(errDuplicateIdentityName.Error(),"group_name",group.Name,"conflicting_group_name",groupByName.Name,"action","merge the contents of duplicated groups into one and delete the other")
i.logger.Warn(errDuplicateIdentityName.Error(),"entity_name",entity.Name,"conflicting_entity_name",entityByName.Name,"action","merge the duplicate entities into one")
if!i.disableLowerCasedNames{
returnerrDuplicateIdentityName
}
}
// Only update MemDB and don't hit the storage again
err=i.upsertEntity(ctx,entity,nil,false)
iferr!=nil{
...
...
@@ -223,7 +281,9 @@ func (i *IdentityStore) upsertEntityInTxn(ctx context.Context, txn *memdb.Txn, e
returnfmt.Errorf("entity is nil")
}
for_,alias:=rangeentity.Aliases{
aliasFactors:=make([]string,len(entity.Aliases))
forindex,alias:=rangeentity.Aliases{
// Verify that alias is not associated to a different one already
i.logger.Warn(errDuplicateIdentityName.Error(),"alias_name",alias.Name,"mount_accessor",alias.MountAccessor,"entity_name",entity.Name,"action","delete one of the duplicate aliases")
if!i.disableLowerCasedNames{
returnerrDuplicateIdentityName
}
}
// Insert or update alias in MemDB using the transaction created above