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

A managed object is not capable of handling simultaneous requests from an edge

    Details

      Description

      The scenario can be replicated by doing the following. 
      1) Create 1 managed user in IDM. 
      2) Create 2 managed roles in IDM where the 'members' field includes the 'managed/user/fromStep1 simultaneously.

      Notice that you will see a stack trace like this

      [243] Jan 10, 2019 10:10:29.781 AM org.forgerock.openidm.relationship.impl.notify.EdgeToVertexNotifierBase lambda$dispatchEdgeCreationAction$0
      WARNING: Exception caught signalling creation of edge 6ce3d1ed-4f6a-45a5-9516-6e894cc739c1 to referenced vertex managed/user/88eedeb8-9489-43ea-9266-17f207c03d9f.
      org.forgerock.json.resource.PreconditionFailedException: Update rejected as current Object revision 1 is different than expected by caller (0), the object has changed since retrieval.
      	at org.forgerock.openidm.repo.jdbc.impl.GenericTableHandler.update(GenericTableHandler.java:702)
      	at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.lambda$handleUpdate$3(JDBCRepoService.java:410)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:112)
      	at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.handleUpdate(JDBCRepoService.java:389)
      	at org.forgerock.json.resource.Router.handleUpdate(Router.java:345)
      	at org.forgerock.json.resource.Router.handleUpdate(Router.java:345)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:115)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterUpdate$6(AuditFilter.java:152)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:172)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterUpdate(AuditFilter.java:152)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      
      

      The reason for this is because each of the managed roles are creating the relationship between themselves and the same managed/user which results in the edge signaling the managed user for each request. There is no current retry logic in the handleSignalVertexUpdateFromEdge so the first one succeed but the second fails.

        Attachments

          Activity

            People

            • Assignee:
              alin Alin Brici
              Reporter:
              alin Alin Brici
              QA Assignee:
              Miroslav Meca
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: