Defect #3037
closedBusiness role breaks referential integrity and all task are in state wainting
100%
Description
- customer add new business role,
- while new business is added to new user administrator same execute delete on same business role,
- this behavior break (sometimes) referential integrity.
After this every operation on affected user violates error event or error role request etc.
Main issue with this behavior is that all task that execute any operation on affected user will be mark with "waiting" state. But all task waits on error events or etc.
Every another task that will be executed after is exceeded number of thread will be marked with state "created".
Please see images (sorry for czech language). Feel free to write us with all another questions and analyze.
Files
Updated by Ondřej Kopr almost 3 years ago
- Priority changed from Normal to High
Still appears :( and more often than before
For workaround exists only one solutions. Remove all broken records from db manually:
select * from idm_identity_role ir where ir.role_composition_id is not null and not exists (select * from idm_role_composition rc where rc.id = ir.role_composition_id);
select * from acc_identity_account ia where ia.identity_role_id is not null and not exists (select * from idm_identity_role ir where ir.id = ia.identity_role_id);
select * from idm_identity_role ir where ir.direct_role_id is not null and not exists (select * from idm_identity_role ir2 where ir.direct_role_id = ir2.id)
Updated by Tomáš Doischer over 2 years ago
- Assignee changed from Roman Kučera to Tomáš Doischer
Updated by Tomáš Doischer over 2 years ago
- Status changed from New to Needs feedback
- Assignee changed from Tomáš Doischer to Roman Kučera
- % Done changed from 0 to 100
The solution is the same as the one working in ProcessAutomaticRoleByAttributeTaskExecutor. Even if the create task is waiting, we cannot start the removal. I tested it and it works well.
PR: https://github.com/bcvsolutions/CzechIdMng/pull/196
@kucerar, can you please give me feedback?
Updated by Roman Kučera over 2 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Roman Kučera to Tomáš Doischer
Thx, merged into develop
Updated by Tomáš Doischer over 2 years ago
We also need to add this fix to 11.2.6.
PR: https://github.com/bcvsolutions/CzechIdMng/pull/214
@kucerar, can you take a look, please?