This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-996c4cd8-33e9-4e54-a133-7e5cfda471d7 XWIKI-25439 Open

Errors are logged on every cluster member when a wiki is deleted

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-89ef24c1-a6c4-4b13-b3e2-320dc3f8440b Simon Urli created this issue on 21/Oct/26 16:39
 
Summary: Errors are logged on every cluster member when a wiki is deleted
Issue Type: cid:jira-generated-image-avatar-996c4cd8-33e9-4e54-a133-7e5cfda471d7 Bug
Affects Versions: 17.10.14
Assignee: Unassigned
Components: Observation, Old Core
Created: 21/Oct/26 16:39
Priority: cid:jira-generated-image-static-major-5d109e89-b70c-4d55-a17f-d1bd64585b02 Major
Reporter: Simon Urli
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).