Uploaded image for project: 'Change Request Application'
  1. Change Request Application
  2. CRAPP-441

Error when converting FileChangeDocumentSavedEvent on other cluster nodes when creating a change request

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.26
    • 1.5
    • None
    • None
    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce

      1. Set up an XWiki cluster with 2 nodes sharing the same database
      2. On node 1, create a change request (or split an existing one)
      3. Look at the logs of node 2

      Actual result

      Node 2 logs an error such as:

      ERROR r.ChangeRequestEventsConverter - Cannot find change request [b5fac2f9-53da-4581-89c6-9343ba0259ef] to convert event [event: [org.xwiki.contrib.changerequest.events.FileChangeDocumentSavedEvent@39f34765], source: [(b5fac2f9-53da-4581-89c6-9343ba0259ef,filechange-2.1--4886192540806087103)], data: [{docversion=1.1, doclanguage=, origdocversion=1.1, origdoclanguage=, docname=...}]]
      

      and the FileChangeDocumentSavedEvent is not replayed on node 2.

      Expected result

      No error: the event is properly converted and replayed on the other node.

      Cause

      When saving a change request, the file changes are saved (and FileChangeDocumentSavedEvent is sent) before the change request document itself is saved. When the change request is new, the other node receives the event while the change request document doesn't exist yet in the database, so it cannot load the change request to convert the event.

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: