Open evdherberg opened 2 years ago
Those joinedCluster()
invocations are no longer vulnerable with the fix in https://github.com/igniterealtime/openfire-hazelcast-plugin/commit/b454bff2edf77fe5ab9602f8ce41fdce2cd9fbac in place, correct?
If that's the case, then the only thing to do is to verify that this plugin has no other event listeners that could trigger a 'premature' task execution?
In #65 we observed that, at the moment the
memberAdded(final MembershipEvent event)
is received in theClusterListener
, theCacheFactory
is still using theDefaultLocalCacheStrategy
instead of the strategy from the plugin. This resulted in a silent ignore of the cluster task we introduced in that method. Because that's what the default cache strategy does with cluster tasks.The problem was resolved in https://github.com/igniterealtime/openfire-hazelcast-plugin/pull/66/commits/b454bff2edf77fe5ab9602f8ce41fdce2cd9fbac by introducing a short wait, until we observe the
CacheFactory
actually using the strategy provided by this plugin. In local testing, this always happened within the first 200ms of waiting.Probably it is wise to check whether there are any other event handlers that rely on the cache being properly swapped already. Note that the
joinedCluster()
events are evoked from thememberAdded
handler in the plugin, so those could possibly be vulnerable in this respect.