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

Possible lock between delete/create IT services methods

    XMLWordPrintable

    Details

      Description

      It happens because of Zabbix does not sort rows before update/delete. For example:

      SQL (0.000334): UPDATE services SET status='0' WHERE serviceid='330'
      CAPIObject->delete() -> CAPIObject->__call() -> czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CService->delete() -> update_services_status_all() -> update_services_rec() -> update_services_rec() -> DBexecute()
      SQL (0.000292): UPDATE services SET status='0' WHERE serviceid='325'
      CAPIObject->delete() -> CAPIObject->__call() -> czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CService->delete() -> update_services_status_all() -> update_services_rec() -> update_services_rec() -> update_services_rec() -> DBexecute()
      SQL (0.000444): UPDATE services SET status='0' WHERE serviceid='1355'
      CAPIObject->delete() -> CAPIObject->__call() -> czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CService->delete() -> update_services_status_all() -> update_services_rec() -> DBexecute()
      SQL (0.000305): UPDATE services SET status='0' WHERE serviceid='1301'
      CAPIObject->delete() -> CAPIObject->__call() -> czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CService->delete() -> update_services_status_all() -> update_services_rec() -> update_services_rec() -> DBexecute()
      

      The behavior can cause to deadlocks and locks

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              dotneft Alexey Pustovalov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: