Hi, The deadlock issue(https://wso2.org/jira/browse/MB-1326) come up in oracle and mssql when clearResourceAuthorizations where permissions are deleted in UM_ROLE_PERMISSIONS, UM_USER_PERMISSIONS and UM_PERMISSION tables through one transaction. The fix would be using cascade delete for above tables.
But I think another issue(foreign key constraint violation) may come up when addAuthorizationForRole, as following example scenario. Ex: Node1 may be retrieve the permission entry in UM_PERMISSION table (in addAuthorizationForRole()) and just after that node2 may delete the entry (in clearResourceAuthorizations()) and after that when node1 trying to delete & add permissions in UM_ROLE_PERMISSIONS (in addAuthorizationForRole()) will return the above exception since the entry in UM_PERMISSION is already deleted. I think the fix need to be, if UM_ROLE_PERMISSIONS and UM_PERMISSION tables are going to update, first have to lock both tables, until all the required operations are finished. Then meanwhile another node can't delete any entries. Please provide your opinions regarding this. Thanks and Regards -- Indunil Upeksha Rathnayake Software Engineer | WSO2 Inc Email [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
