[jira] [Commented] (IGNITE-2708) Need to validate that SPIs are started only once

2016-04-18 Thread Ryan Zhao (JIRA)

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

Ryan Zhao commented on IGNITE-2708:
---

test results : pull/544/merge
Pull request : https://github.com/apache/ignite/pull/544

> 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
(v6.3.4#6332)


[jira] [Commented] (IGNITE-2404) TcpDiscoverySpi.setLocalPortRange set 0 doesn't work

2016-04-18 Thread Ryan Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15245463#comment-15245463
 ] 

Ryan Zhao commented on IGNITE-2404:
---

Pull request: https://github.com/apache/ignite/pull/549
tests result: pull/549/merge

> TcpDiscoverySpi.setLocalPortRange set  0 doesn't work
> -
>
> Key: IGNITE-2404
> URL: https://issues.apache.org/jira/browse/IGNITE-2404
> Project: Ignite
>  Issue Type: Bug
>Reporter: Denis Magda
>Assignee: Ryan Zhao
>  Labels: community, newbie
>
> Local port range set to 0 presently doesn't work at least for 
> TcpCommunicationSpi and TcpDiscoverySpi. However SPIs support it.
> In my understanding the condition has to changed to the following one (from < 
> to <=).
> x = port; x <= port + range



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (IGNITE-2708) Need to validate that SPIs are started only once

2016-04-13 Thread Ryan Zhao (JIRA)

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

Ryan Zhao commented on IGNITE-2708:
---

Hi Valentin, I've already tested my latest changes. But there are some test 
fails which I don't know why...

> 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
(v6.3.4#6332)


[jira] [Commented] (IGNITE-2404) TcpDiscoverySpi.setLocalPortRange set 0 doesn't work

2016-04-13 Thread Ryan Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15238753#comment-15238753
 ] 

Ryan Zhao commented on IGNITE-2404:
---

Hi, I've run all the tests. And, there are some test fails which seems not 
caused by my changes. Does it matter?

> TcpDiscoverySpi.setLocalPortRange set  0 doesn't work
> -
>
> Key: IGNITE-2404
> URL: https://issues.apache.org/jira/browse/IGNITE-2404
> Project: Ignite
>  Issue Type: Bug
>Reporter: Denis Magda
>Assignee: Ryan Zhao
>  Labels: community, newbie
>
> Local port range set to 0 presently doesn't work at least for 
> TcpCommunicationSpi and TcpDiscoverySpi. However SPIs support it.
> In my understanding the condition has to changed to the following one (from < 
> to <=).
> x = port; x <= port + range



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (IGNITE-2404) TcpDiscoverySpi.setLocalPortRange set 0 doesn't work

2016-04-12 Thread Ryan Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15237208#comment-15237208
 ] 

Ryan Zhao commented on IGNITE-2404:
---

Hi Denis, I just found that I need manually run tests on teamcity.
I will let you know as soon as possible when all test passed.

> TcpDiscoverySpi.setLocalPortRange set  0 doesn't work
> -
>
> Key: IGNITE-2404
> URL: https://issues.apache.org/jira/browse/IGNITE-2404
> Project: Ignite
>  Issue Type: Bug
>Reporter: Denis Magda
>Assignee: Ryan Zhao
>  Labels: community, newbie
>
> Local port range set to 0 presently doesn't work at least for 
> TcpCommunicationSpi and TcpDiscoverySpi. However SPIs support it.
> In my understanding the condition has to changed to the following one (from < 
> to <=).
> x = port; x <= port + range



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (IGNITE-2708) Need to validate that SPIs are started only once

2016-03-23 Thread Ryan Zhao (JIRA)

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

Ryan Zhao commented on IGNITE-2708:
---

Completely agree.

> 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
(v6.3.4#6332)


[jira] [Commented] (IGNITE-2708) Need to validate that SPIs are started only once

2016-03-23 Thread Ryan Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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
(v6.3.4#6332)


[jira] [Commented] (IGNITE-2404) TcpDiscoverySpi.setLocalPortRange set 0 doesn't work

2016-03-23 Thread Ryan Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15208136#comment-15208136
 ] 

Ryan Zhao commented on IGNITE-2404:
---

[~dmagda]

Your proposal is considerably more robust, and I will get it done.

> TcpDiscoverySpi.setLocalPortRange set  0 doesn't work
> -
>
> Key: IGNITE-2404
> URL: https://issues.apache.org/jira/browse/IGNITE-2404
> Project: Ignite
>  Issue Type: Bug
>Reporter: Denis Magda
>Assignee: Ryan Zhao
>  Labels: community, newbie
>
> Local port range set to 0 presently doesn't work at least for 
> TcpCommunicationSpi and TcpDiscoverySpi. However SPIs support it.
> In my understanding the condition has to changed to the following one (from < 
> to <=).
> x = port; x <= port + range



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (IGNITE-2404) TcpDiscoverySpi.setLocalPortRange set 0 doesn't work

2016-03-14 Thread Ryan Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15193085#comment-15193085
 ] 

Ryan Zhao commented on IGNITE-2404:
---

Hi, in the implementation of the change presented above, I have found that many 
component in Ignite have a portRange parameter, such as 
IgniteConfiguration#getTimeServerPortRange and 
ConnectorConfiguration#getPortRange. And in these scenarios portRange equals 0 
is considered to be a mistake.
So, I think we should keep this consistency, and make the docs more clear. 
Any thoughts?

> TcpDiscoverySpi.setLocalPortRange set  0 doesn't work
> -
>
> Key: IGNITE-2404
> URL: https://issues.apache.org/jira/browse/IGNITE-2404
> Project: Ignite
>  Issue Type: Bug
>Reporter: Denis Magda
>Assignee: Ryan Zhao
>  Labels: community, newbie
>
> Local port range set to 0 presently doesn't work at least for 
> TcpCommunicationSpi and TcpDiscoverySpi. However SPIs support it.
> In my understanding the condition has to changed to the following one (from < 
> to <=).
> x = port; x <= port + range



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (IGNITE-2404) TcpDiscoverySpi.setLocalPortRange set 0 doesn't work

2016-03-11 Thread Ryan Zhao (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Zhao reassigned IGNITE-2404:
-

Assignee: Ryan Zhao

> TcpDiscoverySpi.setLocalPortRange set  0 doesn't work
> -
>
> Key: IGNITE-2404
> URL: https://issues.apache.org/jira/browse/IGNITE-2404
> Project: Ignite
>  Issue Type: Bug
>Reporter: Denis Magda
>Assignee: Ryan Zhao
>  Labels: community, newbie
>
> Local port range set to 0 presently doesn't work at least for 
> TcpCommunicationSpi and TcpDiscoverySpi. However SPIs support it.
> In my understanding the condition has to changed to the following one (from < 
> to <=).
> x = port; x <= port + range



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (IGNITE-2404) TcpDiscoverySpi.setLocalPortRange set 0 doesn't work

2016-03-11 Thread Ryan Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15190707#comment-15190707
 ] 

Ryan Zhao commented on IGNITE-2404:
---

The doc on TcpCommunicationSpi.setLocalPortRange() saying that  "If port range 
value is 0, then implementation will try bind only to the port provided by 
setLocalPort(int) method and fail if binding to this port did not succeed."
So, I think it would be a right choice to treat localPortRange=0 as 
localPortRange=1.
 I will solve it.

> TcpDiscoverySpi.setLocalPortRange set  0 doesn't work
> -
>
> Key: IGNITE-2404
> URL: https://issues.apache.org/jira/browse/IGNITE-2404
> Project: Ignite
>  Issue Type: Bug
>Reporter: Denis Magda
>  Labels: community, newbie
>
> Local port range set to 0 presently doesn't work at least for 
> TcpCommunicationSpi and TcpDiscoverySpi. However SPIs support it.
> In my understanding the condition has to changed to the following one (from < 
> to <=).
> x = port; x <= port + range



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)