Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-1386

Multiple variants of the same state can be created

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 3.2.0
    • None

    Description

      As long as there is not yet a live, preview and draft variant, there seems to be room that two variants of the same state are created.

      Reproductions paths:

      Reproduction 2 live variants
      0) Login with admin
      1) Create a draft document and save it. You now have a preview and draft variant
      2) Set a breakpoint at org.onehippo.repository.documentworkflow.DocumentWorkflowImpl#publish()
      3) Login with editor in a different browser
      4) In both browsers, publish the document. Make sure both calls hang on the breakpoint
      5) Stop the debugger (both threads continue)
      6) Result : 2 live variants

      Reproduction 2 draft variants
      0) Login with admin
      1) Go to a bootstrapped live document that does not yet have a draft
      2) Set a breakpoint at org.onehippo.repository.documentworkflow.DocumentWorkflowImpl#obtainEditableInstance
      3) Login with editor in a different browser
      4) In both browsers, click edit the document. Make sure both calls hang on the breakpoint
      5) Stop the debugger (both threads continue)
      6) Result : 2 draft variants

      Once there are three variants, the issue does not seem to occur any more. When there are 3 variants, one of the action just fails (something like [SCXMLWorkflowExecutor.handleException:191] org.apache.jackrabbit.core.state.NoSuchItemStateException: fa8a52a1-3c7b-4ec3-bf75-53f2c65af939). Most likely this is because once there are 3 variants, one of the calls gets a already modified from JCR.

      Customers that have large document structures are more likely to hit this bug.

      Potential solution: On a workflow action, also always touch the handle. This way, the second call is likely to fail because it gets a already modified on the handle node.

      We need to carefully test the solution also in clustered environments.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: