-
Incident report
-
Resolution: Duplicate
-
Minor
-
None
-
1.8.15
Certain behaviour can provoke duplicate entries in the trigger_depends table, resulting in failure when updating to 2.0:
ERROR: could not create unique index "trigger_depends_1"
DETAIL: Table contains duplicated values.
ERROR: current transaction is aborted, commands ignored until end of transaction block
There seem to be different ways to cause the problem. I discovered the following one:
- Create a host, create two items and triggers on these items; add dependency between the two
- Create a template (no need to assign it to a host)
- Copy the items and then the triggers to the template
SELECT count, t.description as trigger_down, t2.description as trigger_up from trigger_depends as td join triggers as t on td.triggerid_down = t.triggerid join triggers as t2 on td.triggerid_up = t2.triggerid group by 2, 3 having count > 1 order by 1 desc;
count | trigger_down | trigger_up
------------------------------------------------------
2 | affentrigger2 | affentrigger
- duplicates
-
ZBX-3920 trigger addDependencies() creates duplicates
- Closed