0
Fixed

Group Transformation hits an upper limit

IDB 5.3.1.0

I'm currently using a group transformation to determine the child objects for org units, and mapping their relational DN (multi valued).

I'm finding that i'm getting the following error in the adapter when it attempts to run reflection:

Adapter
Adapter 81400d1b-2122-4571-92a8-c12470291968 page errored on page reflection. Duration: 00:00:02.5781432. Error: System.Exception: Max iteration count exceeded for base key discovery: ChildOrganisationUnits
at Unify.Product.IdentityBroker.KnownEntityBase`3.GetBaseKeysIter(TKey key)
at Unify.Product.IdentityBroker.KnownEntityBase`3.GetValueOriginInformation(TKey key)
at Unify.Product.IdentityBroker.EntityToEntityValueOriginsAdapter`2.<>c__DisplayClass3_0.<Transform>b__0(GroupedNameValueCollectionKey schemaKey)
at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
at Unify.Framework.Collections.ThreadsafeHashSet`1.UnionWith(IEnumerable`1 enumerable)
at Unify.Product.IdentityBroker.Adapter.WriteReflectionPageAdapterChanges(IAdapterEntityPartitionUpdatableContext adapterContext, IEntityValueOriginContext originContext, IDictionaryTwoPassDifferenceReport`4 report)
at Unify.Product.IdentityBroker.Adapter.ReflectChangesInner()
at Unify.Product.IdentityBroker.Adapter.ReflectChanges()
at Unify.Product.IdentityBroker.AdapterAuditingDecorator.ReflectChanges()
at Unify.Product.IdentityBroker.AdapterNotifierDecorator.ReflectChanges()
at Unify.Product.IdentityBroker.ReflectAdapterOnChangeDueJob.<RunBase>b__9_0(IOperationalAdapter adapter).
Error details:
System.Exception: Max iteration count exceeded for base key discovery: ChildOrganisationUnits
at Unify.Product.IdentityBroker.KnownEntityBase`3.GetBaseKeysIter(TKey key)
at Unify.Product.IdentityBroker.KnownEntityBase`3.GetValueOriginInformation(TKey key)
at Unify.Product.IdentityBroker.EntityToEntityValueOriginsAdapter`2.<>c__DisplayClass3_0.<Transform>b__0(GroupedNameValueCollectionKey schemaKey)
at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
at Unify.Framework.Collections.ThreadsafeHashSet`1.UnionWith(IEnumerable`1 enumerable)
at Unify.Product.IdentityBroker.Adapter.WriteReflectionPageAdapterChanges(IAdapterEntityPartitionUpdatableContext adapterContext, IEntityValueOriginContext originContext, IDictionaryTwoPassDifferenceReport`4 report)
at Unify.Product.IdentityBroker.Adapter.ReflectChangesInner()
at Unify.Product.IdentityBroker.Adapter.ReflectChanges()
at Unify.Product.IdentityBroker.AdapterAuditingDecorator.ReflectChanges()
at Unify.Product.IdentityBroker.AdapterNotifierDecorator.ReflectChanges()
at Unify.Product.IdentityBroker.ReflectAdapterOnChangeDueJob.<RunBase>b__9_0(IOperationalAdapter adapter)


I'm assuming that it's because there's a forced upper limit on how many times it can loop through to find related entities and group - and i'm exceeding that limit with the children.

Would it be possible to get this limit configurable or similar? I'm unsure how many children the largest parent has, but some way around the upper limit would be fantastic.

Under review

From what I recall, it wasn't supposed to bubble all the way up like this. I'll see what Beau thinks when he's in.

Hi Matt,

Here is a patch for you to try: Unify.IdentityBroker.Entity.dll

I increased the iteration limit substantially (way more than would be feasible to reach naturally) but also added more direct protection against situations the iteration limit was originally intended for.

If this issue was caused by more than the iteration limit being to low you should start seeing an exception like "Circular dependency detected while attempting to determine base key of..."

Hey Beau,

Thanks for sending that through. Apologies on the delayed response - i've tested this patch and can confirm that its resolved the issue.