ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-2708) Need to validate that SPIs are started only once
Date Wed, 23 Mar 2016 10:20:25 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15208177#comment-15208177

Ryan Zhao commented on IGNITE-2708:

Hi, the reason I don't take the advice in above ticket is that there are many subclass of
IgniteSpiAdapter either in the main code or test code. So, I think let the GridManagerAdapter
take the responsibility to check whether the spi has started is not a bad idea. 

Using the *injectResouces* method indeed a bad idea, maybe we can let the GridManagerAdapter
explicitly set the spi has been initialized。And using an AtomicBoolean instance for thread-safety.

> Need to validate that SPIs are started only once
> ------------------------------------------------
>                 Key: IGNITE-2708
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2708
>             Project: Ignite
>          Issue Type: Improvement
>          Components: general
>            Reporter: Valentin Kulichenko
>            Assignee: Ryan Zhao
>              Labels: newbie, usability
> User forum discussion: http://apache-ignite-users.70518.x6.nabble.com/Ignite-instance-hangs-during-restart-in-client-mode-td3101.html
> If one uses the same instance of {{IgniteConfiguration}} more than once, it doesn't work
because SPIs have lifecycle and can be started only once. Currently this causes hang on start
which is counterintuitive.
> We should add a validation step to {{GridSpiAdapter}} that will check that the SPI was
never started before. Its {{spiStart()}} method should set some flag there or throw exception
if it has already been set. All internal SPI implementations should be changed to call {{super.spiStart()}}
as first statement.

This message was sent by Atlassian JIRA

View raw message