-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
Affects Version/s: 7.0.23rc1, 7.4.7rc1, 8.0.0alpha2 (master)
-
Component/s: API (A)
-
Sprint candidates
Steps to reproduce:
- Create Host A and host B both linked to host group AB
- Delete both hosts via parallel API execution. E.g. python script => host_delete.py

- Try to delete host group AB
Result: Error related to hgset hash appears:
Error in query [DELETE FROM hstgrp WHERE groupid=22] [Cannot delete or update a parent row: a foreign key constraint fails (`master-mysql`.`hgset_group`, CONSTRAINT `c_hgset_group_2` FOREIGN KEY (`groupid`) REFERENCES `hstgrp` (`groupid`))] [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerHostGroupDelete->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHostGroup->delete() → CHostGroup->deleteForce() → DB::delete() → DB::deleteByPkIds() → DB::deleteByIdField() → DBexecute() → trigger_error() → CConfigFile->{closure:/home/zabbix/workspace/master-mysql/ui/conf/zabbix.conf.php:83}() in conf/zabbix.conf.php:89]
SQL statement execution has failed "DELETE FROM hstgrp WHERE groupid=22"
Hgset hash related to group id 22 stays in DB =>
Expected: host group should be deleted without any errors.