IP-based user garbage collector deletes tasks that are still being imported

XMLWordPrintable

    • High
    • None
    • Fix for a problem where IP based users which is also PM of a task can produce errors
    • None

      Problem

       
      When a temporary IP-based user's session expires, the cleanup job (runs every 15 minutes) deletes the user and all tasks where they are PM - without checking whether any of those tasks are still being processed. If an import is in progress when this happens, the task's materialized view is dropped while a worker is still writing to it. This produces "Base table or view not found" errors in the log and the import fails halfway through. From the user's side, the translation simply disappears from their history.

      Solution

       
      In the IP authentication plugin's GC handler, before removing a task check whether any worker for that task is still in a non-terminal state (anything other than done/defunct) in
      Zf_worker. If yes, skip the task. If any task was skipped, also skip the user deletion - the next GC tick (15 min later) will retry, and once the workers finish naturally, the user and their tasks will be cleaned up as before.

            Assignee:
            Aleksandar Mitrev
            Reporter:
            Aleksandar Mitrev
            None
            None
            Axel Becher
            Stephan Bergmann, Sylvia Schumacher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None