Ivan Fedorenkov created IGNITE-14965: ----------------------------------------
Summary: Ignite is in invalid state when trying to use Ignite as a Spring bean Key: IGNITE-14965 URL: https://issues.apache.org/jira/browse/IGNITE-14965 Project: Ignite Issue Type: Bug Components: spring Affects Versions: 2.10 Reporter: Ivan Fedorenkov The following use-case leads to temporary invalid state errors at the grid startup time: Ignite node has an Ignite Service with Ignite DI being used to inject into that service a Spring-managed bean, which in its turn depends on the Ignite instance, namely the IgniteSpringBean instance. Invoke any method of the bean that uses the Ignite instance from the execute method of the service. Result: IllegalStateException "Ignite is in invalid state to perform this operation". The root cause is that Ignite Services initialization and execution may happen before IgniteSpringBean#afterSingletonInstantiated returns and the inner g variable gets initialized. Please note that even if the g variable gets initialized before any Ignite Service starts executing, a spring-managed bean may still get the exception as the inner g variable is not volatile and other threads may observe the outdated value for some small amount of time. -- This message was sent by Atlassian Jira (v8.3.4#803005)