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

Create a cache to remove the dependency on a trigger for the refResourceCollection table

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: None
    • Labels:

      Description

      Keep the table - discontinue the trigger

      Utilize a Filter

      • On filterCreate check if the resourceCollection is contained in the cache
      • If it is NOT already in the cache, then insert to the table and add to the cache
      • For the first time a resourceCollection does not appear in the cache, then load all of the data from the table to the cache (to populate the cache)
      • Ignore other filters, such as filterUpdate

      The insert if not exists sql will need to be prepared differently for each DB type.

      The removal of this trigger should also repair DB2 failures relating to the trigger

      [156] Nov 13, 2019 7:00:46.640 AM org.forgerock.openidm.sync.SyncOperation lambda$createTargetObject$1
      WARNING: Failed to create target object
      org.forgerock.json.resource.InternalServerErrorException: Creating object failed after 1 attempts (-723-09000): An error occurred in a triggered SQL statement in trigger "SOPENIDM.TRIG_RELATIONSHIP". Information returned for the error i
      ncludes SQLCODE "-803", SQLSTATE "23505" and message tokens "1|SOPENIDM.RELATIONSHIPRESOURCES".. SQLCODE=-723, SQLSTATE=09000, DRIVER=4.15.100
          at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.lambda$handleCreate$5(JDBCRepoService.java:405)
          at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:112)
          at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.handleCreate(JDBCRepoService.java:353)
          at org.forgerock.json.resource.Router.handleCreate(Router.java:265)
          at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:64)
          at org.forgerock.json.resource.ResourceApiVersionRoutingFilter.filterCreate(ResourceApiVersionRoutingFilter.java:47)
          at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:62)
          at org.forgerock.json.resource.FilterChain.handleCreate(FilterChain.java:231)
      ...
      Caused by: com.ibm.db2.jcc.am.SqlException: An error occurred in a triggered SQL statement in trigger "SOPENIDM.TRIG_RELATIONSHIP". Information returned for the error includes SQLCODE "-803", SQLSTATE "23505" and message tokens "1|SOPENIDM.RELATIONSHIPRESOURCES".. SQLCODE=-723, SQLSTATE=09000, DRIVER=4.15.100
          at com.ibm.db2.jcc.am.fd.a(fd.java:701)
          at com.ibm.db2.jcc.am.fd.a(fd.java:60)
          at com.ibm.db2.jcc.am.fd.a(fd.java:127)
          at com.ibm.db2.jcc.am.qo.c(qo.java:2761)
          at com.ibm.db2.jcc.am.qo.a(qo.java:2209)
          at com.ibm.db2.jcc.t4.ab.o(ab.java:850)
          at com.ibm.db2.jcc.t4.ab.j(ab.java:266)
          at com.ibm.db2.jcc.t4.ab.d(ab.java:54)
          at com.ibm.db2.jcc.t4.p.c(p.java:44)
          at com.ibm.db2.jcc.t4.qb.j(qb.java:147)
          at com.ibm.db2.jcc.am.qo.kb(qo.java:2204)
          at com.ibm.db2.jcc.am.ro.b(ro.java:4482)
          at com.ibm.db2.jcc.am.ro.ic(ro.java:807)
          at com.ibm.db2.jcc.am.ro.executeUpdate(ro.java:781)
          at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
          at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
          at org.forgerock.openidm.repo.jdbc.impl.query.TracedPreparedStatement.executeUpdate(TracedPreparedStatement.java:108)
          at org.forgerock.openidm.repo.jdbc.impl.GenericTableHandler.create(GenericTableHandler.java:376)
          at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.lambda$handleCreate$5(JDBCRepoService.java:377)
          ... 140 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                katie.gonzalez Katie Gonzalez
                Reporter:
                katie.gonzalez Katie Gonzalez
                QA Assignee:
                Alexander Dracka
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: