Introduce IUserRepairStep for user-related repair steps to accelerate upgrades/repair



Currently there are many repair steps that need to iterate over all the users to repair stuff.

The problem is that if an upgrade has for example 3 repair steps that all need to iterate over all users, they will iterate over all users 3 times. This is bad for bigger setups with 10000 users or so.

So the idea is to introduce a new category of repair steps IUserRepairStep that accepts a user as input. There would be a main loop that iterates over all users that then passes the user object to each of the user repair steps. This approach would only have a single iteration over all users but multiple processing.

@DeepDiver1975 @butonic


Sounds good. What about repair steps that involve shares and/or otherwise bleed into other user's domains?


This is usually irrelevant to the issue this fixes.

The problem is mostly about iterating over all users, where the main loop is copied over into several repair steps.
The iteration's purpose is only to get all known users from the system as IUser instances (or user ids).

If a repair step needs to perform changes related to connected users, then it can still do it and retrieve the corresponding user afterwards.