Rest API and Multi-node Hazelcast cluster - Delete Room not propagated to other nodes

Description

This is a bug in the REST API's delete MUC Room service, when Hazelcast clustering is enabled, and there is more than one Openfire/Hazelcast node in the cluster.

The failure happens when a MUCRoom is deleted via REST. It will be deleted on node which received, but it will still exist on the other nodes of the openfire cluster.

In the case of deleting a room, with multi-node clustering enabled, sending RoomRemovedEvent to the other cluster nodes will resolve the issue.

if (chatRoom != null) { chatRoom.destroyRoom(null, null); if (ClusterManager.isClusteringStarted()) { // Added block for clustering enabled CacheFactory.doClusterTask(new RoomRemovedEvent((LocalMUCRoom) chatRoom)); } } else { throw new ServiceException("Could not remove the channel", roomName, ExceptionType.ROOM_NOT_FOUND, Response.Status.NOT_FOUND); }

Environment

None

Activity

Show:

David B Harrison April 27, 2018 at 5:24 PM

Pull request was merged. I'm going to resolve this issue

David B Harrison April 27, 2018 at 6:22 AM
Edited

Fixed
Created April 27, 2018 at 5:25 AM
Updated October 28, 2020 at 1:26 PM
Resolved April 27, 2018 at 5:24 PM

Flag notifications