Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14475

Improve very inefficient workflow invocations

    XMLWordPrintable

Details

    • Improvement
    • Status: New
    • High
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • 3
    • Quasar

    Description

      This issue relates to CMS-14460 as it causes many (expected) ItemNotFoundExceptions during indexing.

      Issue description

      The ItemNotFoundException very easily happens in a clustered setup: Eg
      on cluster node A do:

      1. save draft after changing some fields on descendant compounds
      2. commit editable instance
      3. obtain editable instance

      The first step changes descendant nodes of the draft, the last step replaces all the descendant nodes of the draft.

      On cluster node B, the changes from the journal table of the save are processed, but those nodes are also already being removed again by the next changelog : during that process, the indexing of the nodes for the first save typically hit an ItemNotFoundException: since the save, commit, obtain scenario is very common, this happens frequently. Since CMS-14460, this situation is logged on INFO level.

      Solution proposal

      We should improve the typical commit -> obtain flow with a workflow step which retains the draft, something like

      commitAndRetainEditableInstance()
      

      Then in

      org.hippoecm.frontend.editor.HippostdPublishableEditor#save
      org.onehippo.cms.channelmanager.content.document.DocumentsServiceImpl#updateEditableDocument

      we should replace the 'save + commit + obtain' with 'save + commitAndRetain'

      In DocumentsServiceImpl#updateEditableDocument we need to also take care of the

      final Map<String, Serializable> newHints = HintsUtils.getHints(newWorkflow, branchId);
      

      which currently takes the hints when there is no draft holder: According abogaart we can use the publishBranch hint instead so this should be possible to change

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: