[ZBX-6609] A lot of insert statements into escalation table while a big amount of Actions Created: 2013 May 16  Updated: 2017 May 30  Resolved: 2013 May 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.0.7rc1, 2.1.0
Fix Version/s: 2.0.7rc1, 2.1.0

Type: Incident report Priority: Critical
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: escalations, performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

Currently we insert into escalations table records about STOP escalation without checking early started escalation.



 Comments   
Comment by Alexey Pustovalov [ 2013 May 16 ]

It is in actions.c process_actions function:

        while (NULL != (row = DBfetch(result)))
        {
                ZBX_STR2UINT64(actionid, row[0]);
                evaltype = (unsigned char)atoi(row[1]);

                if (SUCCEED == check_action_conditions(event, actionid, evaltype))
                {
                        DBstart_escalation(actionid, event->source == EVENT_SOURCE_TRIGGERS ? event->objectid : 0, event->eventid);

                        if (event->source == EVENT_SOURCE_DISCOVERY || event->source == EVENT_SOURCE_AUTO_REGISTRATION)
                                execute_operations(event, actionid);
                }
                else if (EVENT_SOURCE_TRIGGERS == event->source)
                        DBstop_escalation(actionid, event->objectid, event->eventid);
        }

So for each trigger is gone to OK state we add new row into escalation table.

Comment by dimir [ 2013 May 23 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-6609 .

Comment by Andris Mednis [ 2013 May 24 ]

Successfully tested.

Comment by richlv [ 2013 May 27 ]

(1) i assume this should improve performance -> whatsnew

dimir Good catch, rich. I assume you mean whatsnew in 2.2?

<richlv> as the fix also goes in 2.0.7, it should appear in 2.0.7 whatsnew

dimir Ah, right.

dimir https://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew207

RESOLVED

Comment by dimir [ 2013 May 28 ]

Fixed in pre-2.0.7 r35856. The fix for trunk is much more complicated. It's on its way.

Comment by dimir [ 2013 May 31 ]

Fix for trunk available in the development branch svn://svn.zabbix.com/branches/dev/ZBX-6609-TRUNK .

Comment by Andris Mednis [ 2013 Jun 14 ]

Successfully tested development branch svn://svn.zabbix.com/branches/dev/ZBX-6609-TRUNK.
Proposed changes in r36357.

Comment by dimir [ 2013 Jun 14 ]

Fixed in pre-2.1.0 r36388 .

Generated at Thu Apr 25 06:53:09 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.