Hi Rajeev,

All Ignite callbacks are processed in (=called from) internal Ignite thread
pools.
The generic rule here is to avoid direct Ignite calls from such callbacks.
So, it is better to do all your things in separate threads (use
ExecutorService for instance).
You should pass all work to your own threads and release internal Ignite
threads by returning from callbacks.

Sample code:

        final ExecutorService executorService =
Executors.newFixedThreadPool(10);

        ignite.events().localListen(new IgnitePredicate<Event>() {
            @Override public boolean apply(Event event) {
                executorService.execute(new Runnable() {
                    public void run() {
                        // do all the job here
                        ignite.log().error("Event: " + event.name());
                    }
                });
                return true;
            }
        }, EventType.EVTS_DISCOVERY);

I checked your logs, there are deadlocks at Cache operations.

Thanks,
Alexey.





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

Reply via email to