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

    Details

    • Type: Problem report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.2.6
    • Fix Version/s: 3.2.8rc1
    • Component/s: Server (S)
    • Labels:
      None
    • Team:
      Team C
    • Sprint:
      Sprint 10, Sprint 11, Sprint 12, Sprint 13
    • Story Points:
      3

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            dmitrijs.lamberts Dmitrijs Lamberts
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: