Try running delete users in different datasets
Please test deleting a user in larger datasets than the starter.
I would suggest dotcms.com and try deleting the "License Request" user.
We might need to batch out the db updates. Also it might need to be run in a background thread that uses the notification api to report progress and success
After 2 tries the user deleted successfully but it takes approx 14 min to delete it, as Will said above I guess we need to run in a thread. Also, the message in the front-end just shows for, like a second, we need to add that the user deleted successfully in the log as info.
Documented: http://auth.dotcms.com/docs/latest/deleting-a-user
Pull requests: https://github.com/dotCMS/core/pull/9437 and https://github.com/dotCMS/core/pull/9439
The logic implemented allows the execution of Delete User feature asynchronously. As part of the implementation, each user to be deleted is marked as "deletion in progress". If for any reason the deletion process fails, a manual rollback of the "deletion in progress" is executed. However, if the rollback can not be executed, a stateful job (CleanUnDeletedUsersJob) will run every 24 hours (at 12 am) to restart those dirty-non deleted users.
CleanUnDeletedUsersJob includes three configuration properties:
- ENABLE_CLEAN_UNDELETED_USERS: Boolean that indicates if the job will run when the server starts. Default value: true
- CLEAN_USERS_CRON_EXPRESSION: Period of time in which the job will be scheduled. Default value: 0 0 0 1/1 * ? * (everyday at 12 am)
- CLEAN_UNDELETED_USERS_INTERVAL: Refers to the time in hours in which a "deletion in progress" mark expires. Default value: -25 (24 hours).
Working in Postgres and Oracle
Issue has been fixed. Tried deleting users in different DBs (mysql, postgres, sqlserver, oracle) and it did work. Was able to delete new and existing users Checked "user_" table and entries were removed as well. Tested in master_3.6