[ZBX-5317] Map editor creates duplicate entries in sysmaps_link_triggers table Created: 2012 Jul 12  Updated: 2017 May 30  Resolved: 2012 Sep 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.1
Fix Version/s: 2.0.3rc1, 2.1.0

Type: Incident report Priority: Major
Reporter: Igor Novg Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: linkindicators, maps
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, MySQL


Attachments: PNG File zabbix.png    
Issue Links:
Duplicate
is duplicated by ZBX-5161 mysql error during saving map Closed

 Description   

We have a map. It has some hosts with links. Some links are bound to 4 or more triggers.
Now i'm adding a new trigger to a link and when trying to save the map, i get an error (screenshot attached) about an
unique index violation in MySQL table.

I close the map, open it (unsaved), add the same trigger again, press Apply, Save Map and voila, it's successfully saved.
Then i'm taking next link and having same issue or not

Sometimes it helps to do all changes again, sometime it doesn't, i can't seem to figure out the cause.

The DB was upgraded from 1.8 version, maybe it's related somehow.



 Comments   
Comment by Igor Novg [ 2012 Jul 12 ]

PS:
Funny thing is that after i'm able to successfully save the map, i go to the link's properties, change ONLY the colors of the link's triggers, i'm getting the same error AGAIN.

I've checked the indices, and the color isn't in an unique index, so it seems very strange.

Comment by richlv [ 2012 Jul 12 ]

reproducible with trunk rev 28831.

steps that result in a failure for me :
create a map, add two elements, add link, edit link properties, add link indicator, save map.
go to map list, edit this map again, add another link indicator, save, then add another & save... failure.

there might be a more simple scenario to reproduce it, but i didn't manage to find any yet

output from trunk with debug enabled :

error: Error in query [INSERT INTO sysmaps_link_triggers (triggerid,linktriggerid,drawtype,color,linkid) VALUES ('16537','237','3','DD0000','124')] [Duplicate entry '124-16537' for key 'sysmaps_link_triggers_1']
error: SQL statement execution has failed "INSERT INTO sysmaps_link_triggers (triggerid,linktriggerid,drawtype,color,linkid) VALUES ('16537','237','3','DD0000','124')". [CMap.update -> CMapElement.createLinkTriggers -> DB.insert]

Comment by Alexey Fukalov [ 2012 Jul 26 ]

dev branch: svn://svn.zabbix.com/branches/dev/ZBX-5317

Comment by Pavels Jelisejevs (Inactive) [ 2012 Aug 20 ]

TESTED.

Comment by Alexey Fukalov [ 2012 Aug 20 ]

Fixed in pre-2.0.3rc1 29651, pre-2.1.0rc1 29652

Comment by Oleksii Zagorskyi [ 2012 Sep 02 ]

Reopen to fix Fix version - 2.0.4 is wrong

Comment by Oleksii Zagorskyi [ 2012 Sep 02 ]

Closed again, including 2.1.0

Generated at Fri Mar 29 14:55:45 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.