Project

General

Profile

Bug #7747

ClusterRepoItemEvent causes exceptions

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Database:
n/a
Applicable version:
git/master
Source Code Disclaimer:

Description

Following exception is being thrown when one of the cluster nodes fires ClusterRepoItemEvent:

2018-06-17 13:42:26.768 [in_0-eventbus]    StanzaProcessor.processPacket()         SEVERE:   Unsupported conversion to class tigase.cluster.repo.ClusterRepoItem when processing from=eventbus@ip-10-0-33-215.us-west-2.compute.internal, to=eventbus@ip-10-0-21-93.us-west-2.compute.internal, DATA=<message xmlns="jabber:client" id="ip-10-0-33-215.us-west-2.compute.internal-4" from="eventbus@ip-10-0-33-215.us-west-2.compute.internal" to="eventbus@ip-10-0-21-93.us-west-2.compute.internal"><event xmlns="http://jabber.org/protocol/pubsub#event"><items node="tigase.cluster.repo.ClusterRepoItemEvent"><item><tigase.cluster.repo.ClusterRepoItemEvent><action>UPDATED</action><item>ip-10-0-21-93.us-west-2.compute.internal:1bec8aab36d1f381630583fd310ac2b02527b455b5eeeea11e129fce8ee29c31:5277:1529242943923:99.99:36.972363:ec2-34-215-29-103.us-west-2.compute.amazonaws.com</item></tigase.cluster.repo.ClusterRepoItemEvent></item></items></event></message>, SIZE=654, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=ADMIN, TYPE=null
java.lang.RuntimeException: Unsupported conversion to class tigase.cluster.repo.ClusterRepoItem
    at tigase.kernel.DefaultTypesConverter.convert(DefaultTypesConverter.java:325)
    at tigase.eventbus.impl.EventBusSerializer.deserialize(EventBusSerializer.java:72)
    at tigase.eventbus.component.EventReceiverModule.fireEventLocally(EventReceiverModule.java:130)
    at tigase.eventbus.component.EventReceiverModule.process(EventReceiverModule.java:111)
    at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:167)
    at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:88)
    at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:84)
    at tigase.eventbus.component.EventBusComponent.processPacket(EventBusComponent.java:96)
    at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1367)

Associated revisions

Revision 28e0e392 (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 8 months ago

#7747: changing ClusterRepoItemEvent scope from cluster to local

History

#2 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam 8 months ago

  • Status changed from New to In QA
  • Assignee changed from Andrzej Wójcik to Wojciech Kapcia
  • % Done changed from 0 to 100

This event was implementing Serializable which forced it to be executed in the cluster scope. Due to that it (and its properties) where serialized on the cluster node which fired this event and then deserialization was happening on the other cluster nodes. Unfortunately, for this to work, all types/classes of event fields need to be either serializable/deserializable or marked as transientbut it was not true for ClusterRepoItem.

As this event is fired on each cluster node when new nodes is found in the cluster nodes repository, there is no point to fire it in the cluster scope. Instead it should be fired in the local node scope (no serizalization needed) and it will be fired on every cluster node as each cluster node will detect change in the list of cluster nodes and will fire it on its own.

Due to that, I've changed this scope to local (removed implements Serializable and empty constructor).

#3 Updated by Wojciech Kapcia TigaseTeam 8 months ago

  • Status changed from In QA to Closed

Also available in: Atom PDF