Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19471

Duplicate entries in the asynchronous document static analyzis queue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 14.1
    • 14.1-rc-1
    • Index
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      There are duplicate entries in the task queue for document analysis on startup, causing warnings like

      2022-02-25 14:48:21,304 [task-manager-consumer] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Warning Code: -1100, SQLState: 02000
      2022-02-25 14:48:21,304 [task-manager-consumer] WARN  o.h.e.j.s.SqlExceptionHelper   - no data
      

      as the task is processed twice and the second time it doesn't exist in the database anymore.

      I did some debugging to find out how this happens. Basically what happens is that documents like Document Scheduler.NotificationEmailDailySender are updated before the tasks are read from the database. This means that the update event writes a task to the database and then this very same task is read back into the queue during the initialization. I suspect a similar issue could also happen if a document is saved twice with the same version which would create two tasks in the queue but just one in the database if the first task hasn't been finished before the second one is added. In this case the second task would also be lost if the processing is stopped during its execution.

      Attachments

        Issue Links

          Activity

            People

              mleduc Manuel Leduc
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: