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

Concurrent recons could cause exception deleting interim state instance deleteInterimStateInstance

    Details

    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      2
    • Sprint:
      OpenIDM Sprint 6.5-10.2
    • Support Ticket IDs:

      Description

      To reproduce the issue:

      1. Create a large CSV file, with for example 10000 entries
      2. Set up a mapping from the CSV file to managed/user.
      3. Create another mapping from managed/user to DJ.
      4. Call reconById in the postCreate script hook of managed/user, with waitForCompletion set to true

      openidm.action('recon', 'reconById', {}, {'mapping': 'managedUser_systemDjAccount', 'id': object._id, 'waitForCompletion': true});
      

      5. Disable implicit sync in the managed/user to DJ mapping.
      6. Reconcile CSV to managed/user, and the following exception is thrown in console and idm log

      Sep 20, 2018 10:49:12 AM org.forgerock.openidm.sync.impl.RepoReconProgressStatePersistence deleteInterimStateInstance
      SEVERE: Exception caught deleting interim state instance with id 98a54231-63b3-43ce-83e1-4a3be031f3bc
      org.forgerock.json.resource.NotFoundException: Object does not exist for delete on: reconprogressstate/98a54231-63b3-43ce-83e1-4a3be031f3bc
      	at org.forgerock.openidm.repo.jdbc.impl.GenericTableHandler.delete(GenericTableHandler.java:761)
      	at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.handleDelete(JDBCRepoService.java:545)
      	at org.forgerock.json.resource.Router.handleDelete(Router.java:278)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleDelete(FilterChain.java:75)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterDelete(Filters.java:64)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleDelete(FilterChain.java:73)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterDelete(Filters.java:64)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleDelete(FilterChain.java:73)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterDelete(Filters.java:64)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleDelete(FilterChain.java:73)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterDelete$2(AuditFilter.java:125)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:169)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterDelete(AuditFilter.java:125)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterDelete(MutableFilterDecorator.java:78)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterDelete(Filters.java:62)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleDelete(FilterChain.java:73)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterDelete$2(ServletConnectionFactory.java:401)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:446)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterDelete(ServletConnectionFactory.java:401)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleDelete(FilterChain.java:73)
      	at org.forgerock.openidm.filter.PassthroughFilter.filterDelete(PassthroughFilter.java:54)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterDelete(MutableFilterDecorator.java:78)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterDelete(MutableFilterDecorator.java:78)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleDelete(FilterChain.java:73)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterDelete(Filters.java:64)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleDelete(FilterChain.java:73)
      	at org.forgerock.json.resource.FilterChain.handleDelete(FilterChain.java:234)
      	at org.forgerock.json.resource.InternalConnection.deleteAsync(InternalConnection.java:47)
      	at org.forgerock.json.resource.AbstractAsynchronousConnection.delete(AbstractAsynchronousConnection.java:52)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.delete(AbstractConnectionWrapper.java:110)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.delete(ServletConnectionFactory.java:322)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.delete(AbstractConnectionWrapper.java:110)
      	at org.forgerock.openidm.sync.impl.RepoReconProgressStatePersistence.deleteInterimStateInstance(RepoReconProgressStatePersistence.java:259)
      	at org.forgerock.openidm.sync.impl.RepoReconProgressStatePersistence.deletePersistedInstances(RepoReconProgressStatePersistence.java:172)
      	at org.forgerock.openidm.sync.impl.ReconciliationService.lambda$cullReconProgressState$3(ReconciliationService.java:550)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
      	at java.util.stream.SliceOps$1$1.accept(SliceOps.java:204)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812)
      	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
      	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
      	at org.forgerock.openidm.sync.impl.ReconciliationService.cullReconProgressState(ReconciliationService.java:549)
      	at org.forgerock.openidm.sync.impl.ReconciliationService.reconcile(ReconciliationService.java:469)
      	at org.forgerock.openidm.sync.impl.ReconciliationService.handleAction(ReconciliationService.java:386)
      	at org.forgerock.json.resource.Router.handleAction(Router.java:250)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:55)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterAction$0(AuditFilter.java:113)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:169)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterAction(AuditFilter.java:113)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:42)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterAction$0(ServletConnectionFactory.java:389)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:446)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterAction(ServletConnectionFactory.java:389)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
      	at org.forgerock.openidm.filter.PassthroughFilter.filterAction(PassthroughFilter.java:42)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
      	at org.forgerock.json.resource.FilterChain.handleAction(FilterChain.java:222)
      	at org.forgerock.json.resource.InternalConnection.actionAsync(InternalConnection.java:29)
      	at org.forgerock.json.resource.AbstractAsynchronousConnection.action(AbstractAsynchronousConnection.java:32)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.action(AbstractConnectionWrapper.java:65)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.action(ServletConnectionFactory.java:354)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.action(AbstractConnectionWrapper.java:65)
      	at org.forgerock.openidm.script.impl.ResourceFunctions$ActionFunction.action(ResourceFunctions.java:946)
      	at org.forgerock.openidm.script.impl.ResourceFunctions$ActionFunction.call(ResourceFunctions.java:926)
      	at org.forgerock.openidm.script.impl.ResourceFunctions$ActionFunction.call(ResourceFunctions.java:828)
      	at org.forgerock.openidm.script.javascript.ScriptableFunction.call(ScriptableFunction.java:103)
      	at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
      	at org.mozilla.javascript.gen._06F210B5837A6A79D1E1330E8B4635CC46EC63B6_25._c_script_0(06F210B5837A6A79D1E1330E8B4635CC46EC63B6:2)
      	at org.mozilla.javascript.gen._06F210B5837A6A79D1E1330E8B4635CC46EC63B6_25.call(06F210B5837A6A79D1E1330E8B4635CC46EC63B6)
      	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
      	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
      	at org.mozilla.javascript.gen._06F210B5837A6A79D1E1330E8B4635CC46EC63B6_25.call(06F210B5837A6A79D1E1330E8B4635CC46EC63B6)
      	at org.mozilla.javascript.gen._06F210B5837A6A79D1E1330E8B4635CC46EC63B6_25.exec(06F210B5837A6A79D1E1330E8B4635CC46EC63B6)
      	at org.forgerock.openidm.script.javascript.RhinoScript.eval(RhinoScript.java:285)
      	at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.forgerock.openidm.script.registry.ScriptRegistryImpl$LibraryRecord.invoke(ScriptRegistryImpl.java:539)
      	at com.sun.proxy.$Proxy30.eval(Unknown Source)
      	at org.forgerock.openidm.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:814)
      	at org.forgerock.openidm.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:825)
      	at org.forgerock.openidm.managed.ManagedObjectSet.execScript(ManagedObjectSet.java:463)
      	at org.forgerock.openidm.managed.ManagedObjectSet.execScriptHook(ManagedObjectSet.java:427)
      	at org.forgerock.openidm.managed.ManagedObjectSet.createInstance(ManagedObjectSet.java:904)
      	at org.forgerock.json.resource.InterfaceCollectionHandler.handleCreate(InterfaceCollectionHandler.java:31)
      	at org.forgerock.json.resource.Router.handleCreate(Router.java:264)
      	at org.forgerock.openidm.managed.ManagedObjectService$ManagedObjectSetRequestHandler.handleCreate(ManagedObjectService.java:200)
      	at org.forgerock.json.resource.Router.handleCreate(Router.java:264)
      	at org.forgerock.openidm.managed.ManagedObjectService.handleCreate(ManagedObjectService.java:322)
      	at org.forgerock.json.resource.Router.handleCreate(Router.java:264)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:65)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterCreate(Filters.java:54)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:63)
      	at org.forgerock.openidm.filter.ScriptedFilter.lambda$filterCreate$1(ScriptedFilter.java:89)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:252)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:216)
      	at org.forgerock.openidm.filter.ScriptedFilter.filterRequest(ScriptedFilter.java:145)
      	at org.forgerock.openidm.filter.ScriptedFilter.filterCreate(ScriptedFilter.java:89)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterCreate(Filters.java:52)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:63)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterCreate(Filters.java:54)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:63)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterCreate$1(AuditFilter.java:119)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:169)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterCreate(AuditFilter.java:119)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterCreate(MutableFilterDecorator.java:72)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterCreate(Filters.java:52)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:63)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterCreate$1(ServletConnectionFactory.java:395)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:446)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterCreate(ServletConnectionFactory.java:395)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:63)
      	at org.forgerock.openidm.filter.PassthroughFilter.filterCreate(PassthroughFilter.java:48)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterCreate(MutableFilterDecorator.java:72)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterCreate(MutableFilterDecorator.java:72)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:63)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterCreate(Filters.java:54)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:63)
      	at org.forgerock.json.resource.FilterChain.handleCreate(FilterChain.java:228)
      	at org.forgerock.json.resource.InternalConnection.createAsync(InternalConnection.java:40)
      	at org.forgerock.json.resource.AbstractAsynchronousConnection.create(AbstractAsynchronousConnection.java:42)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.create(AbstractConnectionWrapper.java:92)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.create(ServletConnectionFactory.java:272)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.create(AbstractConnectionWrapper.java:92)
      	at org.forgerock.openidm.sync.impl.SyncOperation.createTargetObject(SyncOperation.java:873)
      	at org.forgerock.openidm.sync.impl.SyncOperation.performAction(SyncOperation.java:459)
      	at org.forgerock.openidm.sync.impl.SourceSyncOperation.sync(SourceSyncOperation.java:78)
      	at org.forgerock.openidm.sync.impl.SourceRecon.recon(SourceRecon.java:75)
      	at org.forgerock.openidm.sync.impl.ReconTask.call(ReconTask.java:57)
      	at org.forgerock.openidm.sync.impl.ReconTask.call(ReconTask.java:24)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.forgerock.json.resource.NotFoundException: Object reconprogressstate/98a54231-63b3-43ce-83e1-4a3be031f3bc not found in reconprogressstate
      	at org.forgerock.openidm.repo.jdbc.impl.GenericTableHandler.readForUpdate(GenericTableHandler.java:666)
      	at org.forgerock.openidm.repo.jdbc.impl.GenericTableHandler.delete(GenericTableHandler.java:758)
      	... 153 more
      
      
      

        Attachments

          Activity

            People

            • Assignee:
              travis.haagen Travis Haagen
              Reporter:
              yinyan.cao Yinyan Cao
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: