Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-2963

Queuing matchanalysis multiple times leads to locked tasks

    XMLWordPrintable

Details

    • High
    • FIX: Prevent running multiple operations for the same task

    Description

      problem

      In multi target language projects, it may happen that users queue the matchanalysis process multiple times.

      This leads then to unusable tasks, since the task status is never set to open again.

      reason

      According to the worker table:

      mysql (8.0.28) [DB1010] > select id, parentId, state, worker, starttime, endtime, parameters from Zf_worker where worker = 'editor_Task_Operation_FinishingWorker' and taskGuid = '{XXX-f42e-4435-b720-XXXX}';   
      +-------+----------+-------+---------------------------------------+---------------------+---------------------+-----------------------------------------------------------------------------------------------+
      
      | id    | parentId | state | worker                                | starttime           | endtime             | parameters                                                                                    |
      
      +-------+----------+-------+---------------------------------------+---------------------+---------------------+-----------------------------------------------------------------------------------------------+
      
      | 50462 |    50461 | done  | editor_Task_Operation_FinishingWorker | 2022-05-09 11:59:40 | 2022-05-09 11:59:40 | a:2:{s:13:"operationType";s:13:"matchanalysis";s:16:"taskInitialState";s:4:"open";}           |
      
      | 50528 |    50527 | done  | editor_Task_Operation_FinishingWorker | 2022-05-09 11:59:40 | 2022-05-09 11:59:40 | a:2:{s:13:"operationType";s:13:"matchanalysis";s:16:"taskInitialState";s:13:"matchanalysis";} |
      
      | 50577 |    50576 | done  | editor_Task_Operation_FinishingWorker | 2022-05-09 12:10:11 | 2022-05-09 12:10:11 | a:2:{s:13:"operationType";s:13:"matchanalysis";s:16:"taskInitialState";s:13:"matchanalysis";} |
      
      | 50601 |    50600 | done  | editor_Task_Operation_FinishingWorker | 2022-05-09 12:36:37 | 2022-05-09 12:36:37 | a:2:{s:13:"operationType";s:13:"matchanalysis";s:16:"taskInitialState";s:13:"matchanalysis";} |
      
      | 50606 |    50605 | done  | editor_Task_Operation_FinishingWorker | 2022-05-09 12:36:37 | 2022-05-09 12:36:37 | a:2:{s:13:"operationType";s:13:"matchanalysis";s:16:"taskInitialState";s:13:"matchanalysis";} |
      
      +-------+----------+-------+---------------------------------------+---------------------+---------------------+-----------------------------------------------------------------------------------------------+
      
      
      

      Since the matchanalysis operation was added multiple times, the additional finishing worker stores the wrong initial task state. So the task is never opened but always set to matchanalysis again.

      solution

      According to the starttime the workers were running in parallel. So changing them so that they may only run once per task should fix the problem.

      Attachments

        Activity

          People

            axelbecher Axel Becher
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: