Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-15249

Apparent broken Promise chain when culling ReconProgressState and recon association state


    • Target Version/s:
    • Story Points:
    • Sprint:
      2020.14 - IDM


      Not candidate for 7.0 release.

      The Reconciliation.Recon Assoc.Recon Assoc.query_reconciliation_association_header functional tests started failing on DS when the RetryRequestHandlerProxy was removed from the DS repo service. This removal was reverted as part of  https://stash.forgerock.org/projects/OPENIDM/repos/openidm/pull-requests/6680/overview

      Code investigations revealed that recon progress and association state is purged in the ReconciliationService#cullReconProgressAndAssociationState method, which is called in a Runnable lambda in a .thenAlways block. This method returns a Promise. However, looking at PromiseImpl#thenAlways, the invoked Runnable is not integrated into the Promise chain, but rather the Promise passed into thenAlways is simply returned (not sure if it would be possible to integrate a Runnable into a Promise chain). This means that the Promise created as part of ReconciliationService#cullReconProgressAndAssociationState is effectively orphaned. 

      This is likely the cause of the functional test failure mentioned above. In previous cases of orphaned Promises, it does appear that they are run, but always a bit later than the Promise chain that they were supposed to be integrated with. 

      One possible fix would be to .getOrThrow on the Promise created in ReconciliationService#cullReconProgressAndAssociationState. Whatever is done, any failures to cull recon association state should be logged.

      It is likely that IDM calls methods which return Promises in .thenAlways in other places.






            • Assignee:
              katie.gonzalez Katie Gonzalez
              dhogan Dirk Hogan
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: