Hi, the following setup should reproduce the issue:

A server class starts up a server node with the config in my original mail
(eg 3 servers, partitioned with 1 backup). In that class, at the end do
something like:

ignite.events(ignite.cluster().forServers()).localListen(ignitePredicate,
            EventType.EVT_NODE_SEGMENTED, EventType.EVT_NODE_FAILED,
            EventType.EVT_NODE_LEFT);

in that ignitePredicate - "if the current node is the oldest node in the
cluster", then do a ScanQuery on some cache MYCACHE and print out the
records.

The first server to start up will print out all the records.
If you kill the first server, the next oldest server will perform the scan
query upon receiving the NODE_LEFT event and will not print out all the
records (because the localListen runs before the exchange has happened).

Is that enough information?

The issue has gone away now that I have updated my ignitePredicate to merely
set a flag if this node is the oldest, and have a seperate scheduledExecutor
to periodically check that flag, and if true then do the scan query. This
seems to work - probably because there is a sufficient delay before
performing the scan query. My worry is, we could get unlucky with scheduling
and the Scan query could still occur after the flag is set, but before the
locallisten has returned. E.g. ideally it would seem sensible to either
support @IgniteAsyncCallback in this local listen (which hopefully takes
care of the ordering) or have a callback that can be executed after the
localListen has returned (if that is indeed cause of the issue here)





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

Reply via email to