Remove all Custom Notification Filters/Filters for non existing pages


We have a few issues with performance in our XWiki and believe it has something to do with notifications. We found out that we forgot to set automatic page watching to “never” for the “Migration”-user (that user is used to connect to the rest api to create/remove all pages). It’s not really surprising, that a single user with 7k watched pages may cause performance issues. We’ve now set automatic page watching to “never” and disabled all notifications in the user profile. The problem is, that there are 21400 custom filters set and I could not figure out how to remove them.
I already worked through Xwiki 10.5 entended cpu spike while adding new pages this thread, but the script could not remove the objects. I opened the object editor for the user profile but only found 12 objects of XWiki.Notifications.Code.NotificationPreferenceClass which are definitely not the problem (deleted them, lost the preferences, disabled notifications again). Guess I would have seen 21k objects if they were listed there.
When I looked through the list, I noticed that there are entries for pages that don’t exist anymore, not even in the recycle bin. Is it possible, that the notification filters are not removed, when the page is deleted? That would explain why the Migration user could collect 21k custom filters when there are only about 7k pages it created.

Is there a way to remove all custom notification filters?
Shouldn’t notification filters be removed, when the page is deleted? Most likely not immediately, but maybe after some time?

1 Like

Found this post regarding this issue too: Clear all notification filters (Velocity?).
But I don’t find those classes mentioned (XWiki.Notifications.Code.NotificationFilterPreferenceClass and XWiki.WatchListClass) in XWiki anymore.