Hi everyone,
continuing my work on notifications I recently stumbled across the two properties defined in xwiki.properties
: eventstream.uselocalstore
and eventstream.usemainstore
.
Those properties used to have 2 usages: they were used for the storage of the events in the DB, and they were used for the storage of the notification filter preferences that are stored in the DB.
Since we moved the events in Solr, and that we moved the post-filtering code to legacy, the properties are now only used for the storage of the notification filter preferences. So the documentation we currently have in xwiki.properties right now is wrong and outdated since it’s talking about the events.
Now the default for those properties is to rely on the mainStore
(both properties are set to true, but mainStore
has priorities over localStore
). Main store means main wiki here. So the side effect is that right now all notification filter preferences are stored in the main wiki by default, instead of being stored in the same DB than the users: it’s not very consistent and it might even lead to problems in case of manual operations on the DB.
So my proposal here is:
- Remove those properties from xwiki.properties and move the related code using them to legacy
- Change the default about storage of notification filter preference to use the local store, and introduce a migration to move filters of existing installations to the right DB. Also
- Introduce a new fallback property (not documented in xwiki.properties, but only in the RN migration notes) to change the storage of notification filter preferences for backward compatibility (if really someones want to keep the old behaviour)
I’m honestly not 100% sure 3. is needed but it feels safer.
wdyt?