Partition loss event

classic Classic list List threaded Threaded
3 messages Options
balazspeterfi balazspeterfi
Reply | Threaded
Open this post in threaded view
|

Partition loss event

Hi All,

I'm using Ignite 2.7.5 and am trying to add some logic to my service that
would trigger a full data reload in case there was a partition loss event. I
followed the docs and added a listener on the
*EVT_CACHE_REBALANCE_PART_DATA_LOST* event, but my code never gets called. I
was testing it by setting the backups to 0 and cache mode to *PARTITIONED*.
After killing a node I can see errors from Ignite when accessing one of the
keys on the lost partition but for some reason the event listener doesn't
get executed.
This is the error I receive on accessing lost data:

Does anyone have any idea what I can possibly do wrong?

Thanks,
Balazs



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Alexandr Shapkin Alexandr Shapkin
Reply | Threaded
Open this post in threaded view
|

RE: Partition loss event

Hi,

 

You need to configure includeEventTypes configuration property before starting the grid [1]

 

Xml:

<property name="includeEventTypes">

    <list>

        <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST"/>

    </list>

</property>

 

Code:

cfg.setIncludeEventTypes(EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST);

 

[1] - https://apacheignite.readme.io/docs/events#section-configuration

 

 

From: [hidden email]
Sent: Wednesday, July 31, 2019 4:20 PM
To: [hidden email]
Subject: Partition loss event

 

Hi All,

 

I'm using Ignite 2.7.5 and am trying to add some logic to my service that

would trigger a full data reload in case there was a partition loss event. I

followed the docs and added a listener on the

*EVT_CACHE_REBALANCE_PART_DATA_LOST* event, but my code never gets called. I

was testing it by setting the backups to 0 and cache mode to *PARTITIONED*.

After killing a node I can see errors from Ignite when accessing one of the

keys on the lost partition but for some reason the event listener doesn't

get executed.

This is the error I receive on accessing lost data:

 

Does anyone have any idea what I can possibly do wrong?

 

Thanks,

Balazs

 

 

 

--

Sent from: http://apache-ignite-users.70518.x6.nabble.com/

 

Alex Shapkin
balazspeterfi balazspeterfi
Reply | Threaded
Open this post in threaded view
|

RE: Partition loss event

Hi Alexandr,

Thanks, that was the missing part. It would be nice to mention it in the
docs I guess as it's quite easy to miss it.

Regards,
Balazs



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/