Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2
    • Labels:
      None

      Description

      Symptoms:
      Jobs run too long and if executed concurrently, end up with eg. following exception:

      2019-04-24 06:30:00,000 INFO  info.magnolia.module.scheduler.CommandJob         : Starting job [loadBrokenLinks]...
      2019-04-24 06:30:00,653 ERROR ia.jcr.wrapper.MgnlPropertySettingContentDecorator: Failed to update LUD for session: session-admin-226066::foflinks
      javax.jcr.InvalidItemStateException: Unable to update a stale item: item.save()
      	at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:262) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:65) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:363) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:852) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) ~[magnolia-core-5.7.2.jar:?]
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) ~[magnolia-core-5.7.2.jar:?]
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) ~[magnolia-core-5.7.2.jar:?]
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) ~[magnolia-core-5.7.2.jar:?]
      	at info.magnolia.jcr.wrapper.MgnlPropertySettingContentDecorator$MgnlPropertySettingSessionWrapper.save(MgnlPropertySettingContentDecorator.java:535) [magnolia-core-5.7.2.jar:?]
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) [magnolia-core-5.7.2.jar:?]
      	at info.magnolia.audit.MgnlAuditLoggingContentDecoratorSessionWrapper.save(MgnlAuditLoggingContentDecoratorSessionWrapper.java:82) [magnolia-core-5.7.2.jar:?]
      	at info.magnolia.jcr.wrapper.DelegateSessionWrapper.save(DelegateSessionWrapper.java:297) [magnolia-core-5.7.2.jar:?]
      	at info.magnolia.linkmapper.command.LoadLinksCommand.execute(LoadLinksCommand.java:99) [magnolia-linkmapper-3.1.jar:?]
      	at info.magnolia.commands.MgnlCommand.executeSynchronized(MgnlCommand.java:80) [magnolia-core-5.7.2.jar:?]
      	at info.magnolia.commands.MgnlCommand.execute(MgnlCommand.java:69) [magnolia-core-5.7.2.jar:?]
      	at info.magnolia.module.scheduler.CommandJob.execute(CommandJob.java:110) [magnolia-module-scheduler-2.3.1.jar:?]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.3.jar:?]
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.3.jar:?]
      Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: c04e71da-5c2c-4149-9315-435775d17481/{}site has been modified externally
      	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:683) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1514) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1546) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:400) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:354) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:375) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:275) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:258) ~[jackrabbit-core-2.16.1.jar:2.16.1]
      	... 21 more
      

      Workaround: change job to not run concurrently: concurrent=false

      The real problem is structure getting too flat in few areas due to number of similar broken links being ran against the website.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                had Jan Haderka
                Reporter:
                evystup Ervín Výstup
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: