Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12295

Task manager process for closing events fails if related events were deleted before task was processed

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 3.2.8rc1
    • 3.2.6
    • Server (S)
    • None
    • Sprint 10, Sprint 11, Sprint 12, Sprint 13
    • 3

      Doing bulk ack from Problems page to close all problems, tasks are added to database and processed by task manager.

      In case if we ack a lot problems it is possible that related events will be deleted by housekeeper and when task manager will try to process it, it will fail.

      Function: tm_try_task_close_problem
      ...
      result = DBselect("select a.userid,a.eventid,e.objectid"
                                      " from task_close_problem tcp,acknowledges a"
                                      " left join events e"
                                              " on a.eventid=e.eventid"
                                      " where tcp.taskid=" ZBX_FS_UI64
                                              " and tcp.acknowledgeid=a.acknowledgeid",
                              taskid);
      
              if (NULL != (row = DBfetch(result)))
      ...
      

      If query output IS NULL

      28067:20170619:003615.086 query [txnlev:0] [select a.userid,a.eventid,e.objectid from task_close_problem tcp,acknowledges a left join events e on a.eventid=e.eventid where tcp.taskid=123865 and tcp.acknowledgeid=a.acknowledgeid]
      28067:20170619:003615.087 End of tm_try_task_close_problem():FAIL
      

      And these tasks remain in database.

            Unassigned Unassigned
            dlamberts Dmitrijs Lamberts
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: