From fa299c0b7ef79782c03f37628577b31b742c0ad2 Mon Sep 17 00:00:00 2001 From: Guus der Kinderen Date: Fri, 22 Dec 2023 10:53:33 +0100 Subject: [PATCH] fixes #188: Fix for clustering data consistency issue with MUC rooms Since Openfire 4.7.0, a new API is available that ensures that MUC data is synchronized across Openfire cluster nodes. This commit adds support for this API. As a result, data consistency with regards to MUC-related data (chatrooms, mostly), should improve. This commit contains two related changes: - Invocation of `service.syncChatRoom()` after room changes, to ensure that those changes are visible to other cluste nodes. - Application of room-specific mutexes when rooms are interacted with. The addition of an additional mutex typically comes with a risk of introducing a deadlock-like scenario. As a mitigation for this, a new property has been introduced that controls if the mutex is engaged when the REST API interacts with MUC rooms. The property name is `plugin.restapi.muc.room-mutex.enabled` and is enabled by default. To prevent mutex usage, this property can be switced to `false`. --- changelog.html | 5 + plugin.xml | 2 +- src/i18n/restapi_i18n.properties | 1 + src/i18n/restapi_i18n_nl.properties | 1 + .../rest/controller/MUCRoomController.java | 520 ++++++++++++------ 5 files changed, 347 insertions(+), 182 deletions(-) diff --git a/changelog.html b/changelog.html index 3263f72c3..5c3641551 100644 --- a/changelog.html +++ b/changelog.html @@ -44,6 +44,11 @@

REST API Plugin Changelog

+

1.10.3 (tbd)

+ +

1.10.2 November 20, 2023