core icon indicating copy to clipboard operation
core copied to clipboard

Try running delete users in different datasets

Open wezell opened this issue 10 years ago • 6 comments

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

wezell avatar May 09 '16 19:05 wezell

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.

erickgonzalez avatar Jun 29 '16 19:06 erickgonzalez

Documented: http://auth.dotcms.com/docs/latest/deleting-a-user

DeanGonzalez avatar Jul 20 '16 22:07 DeanGonzalez

Pull requests: https://github.com/dotCMS/core/pull/9437 and https://github.com/dotCMS/core/pull/9439

nollymar avatar Jul 27 '16 20:07 nollymar

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).

nollymar avatar Jul 27 '16 20:07 nollymar

Working in Postgres and Oracle

dsilvam avatar Jul 29 '16 20:07 dsilvam

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

shaydotcms avatar Jul 29 '16 20:07 shaydotcms