ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Kulichenko <valentin.kuliche...@gmail.com>
Subject Re: Fix IgniteSpringBean in 2.x
Date Wed, 18 Oct 2017 17:50:00 GMT
Hi Alex,

This indeed has to be fixed, I've seen this issue multiple times.

Can you please clarify the difference between SmartInitializingSingleton
and InitializingBean? And what exactly will not work if we switch? Can you
give an example?


On Wed, Oct 18, 2017 at 8:56 AM, Alexander Fedotov <
alexander.fedotoff@gmail.com> wrote:

> Hi Igniters,
> There is an issue that IgniteSpringBean deadlocks when there is CacheStore,
> Service, you name it with @SpringResource annotated fields
> https://issues.apache.org/jira/browse/IGNITE-6555. The issue appeared
> after
> moving the logic for starting statically configured caches to operate in
> the same way as for dynamic ones: from GridDhtPartitionsExchangeFuture.
> Deadlock occurs because IgniteSpringBean having acquired internal Spring
> lock waits for a GridDhtPartitionsExchangeFuture which is executed in a
> separate thread and which in turn tries to inject @SpringResource annotated
> fields using the passed Spring application context what leads to an attempt
> to acquire the same internal Spring lock that is already being held by the
> main thread.
> A possible solution is to remove IgniteSpringBean#afterPropertiesSet, make
> IgniteSpringBean implement SmartInitializingSingleton and start Ignite
> instance inside afterSingletonsInstantiated.
> The only possible problem here is that an Ignite bean cannot be
> referenced from init-like methods: afterPropertiesSet, @PostConstruct etc.
> Any thoughts? Suggestions?
> Kind regards,
> Alex.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message