Closed Tomvbe closed 4 months ago
Reopened this issue as the deletion of views is slow again after splitting the retention logic to a separate module.
In DeleteEventHandler
we have the following listener:
@EventListener
public void handleViewDeletedEvent(ViewDeletedEvent event) {
String viewName = event.getViewName().asString();
memberPropertiesRepository.getMemberPropertiesWithViewReference(viewName)
.forEach(memberProperties -> memberRemover.removeMemberFromView(memberProperties, viewName));
}
This iterates all members of a view one by one when a view is deleted. When a view has 1 mio members, this takes ages..
Describe the bug Deletion of a rather small view takes more than 10 min. Needs a deep dive into performance.
To Reproduce Steps to reproduce the behavior: