The old implementation of forEachTrackedElement querried both target and source iModels at the same time. It also ordered both querries by FederationGuid. This does not fork for the hybrid (ExternalSourceAspect & FederationGuid) approach because some elements were "acquiring" their federation guids during the initial transformation and the provenance for them was lost because both query results were out of order between each other (an element without fed guid in source query was placed in a different place because it was ordered by its "acquired" federationGuid in the target query).
This caused the transformer to enter an infinite recursion loop when processing element references.
(process inserted element -> process its parent (which already was inserted during initial transformation, but provenance was lost) -> process parent's child elements -> process parent etc.)
The old implementation of
forEachTrackedElement
querried both target and source iModels at the same time. It also ordered both querries by FederationGuid. This does not fork for the hybrid (ExternalSourceAspect & FederationGuid) approach because some elements were "acquiring" their federation guids during the initial transformation and the provenance for them was lost because both query results were out of order between each other (an element without fed guid in source query was placed in a different place because it was ordered by its "acquired" federationGuid in the target query). This caused the transformer to enter an infinite recursion loop when processing element references. (process inserted element -> process its parent (which already was inserted during initial transformation, but provenance was lost) -> process parent's child elements -> process parent etc.)