Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25439

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.14
    • Observation, Old Core
    • 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

          Activity

            People

              Unassigned Unassigned
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: