Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
17.10.14
-
None
-
Unknown
-
Description
Problem
In a cluster, deleting a wiki logs errors both on the member performing the deletion and on each member receiving the WikiDeletedEvent.
DefaultWikiManager#delete notifies WikiDeletedEvent with null as data (as documented in WikiDeletedEvent), but WikiEventConverter, which handles WikiDeletedEvent and WikiCreatedEvent, expects an XWikiContext:
- when sending, WikiEventConverter#toRemote calls serializeXWikiContext(null) which fails with a NullPointerException, logged by DefaultEventConverterManager as Failed to convert local event [...];
- when receiving, WikiEventConverter#fromRemote calls unserializeXWikiContext(null) which fails the same way, logged as Failed to convert remote event [...].
The event still reaches the other members, because DefaultEventConverterManager then tries the next converters and the generic FilteredSerializableEventConverter / SerializableEventConverter handle it (the event is serializable, its source is a String and its data null). So the listeners of WikiDeletedEvent are called on the other members, but each wiki deletion produces an error log on every member.
Expected
WikiEventConverter supports a null data (or the event is sent with a context), and no error is logged.
Found while analyzing the cluster support of the events introduced in XWIKI-25436 (from the code, not reproduced on an actual cluster).
Attachments
Issue Links
- is related to
-
XWIKI-25440 Begin and end events are not reliably tracked on the other cluster members
-
- Open
-
- relates to
-
XWIKI-25436 Introduce events framing the deletion of a wiki
-
- In Progress
-