[jira] [Updated] (IGNITE-6186) Remove redundant parameter of GridFutureAdapter::unregisterWaiter()

2018-01-31 Thread Anton Vinogradov (JIRA)

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

Anton Vinogradov updated IGNITE-6186:
-
Fix Version/s: 2.5

> Remove redundant parameter of GridFutureAdapter::unregisterWaiter()
> ---
>
> Key: IGNITE-6186
> URL: https://issues.apache.org/jira/browse/IGNITE-6186
> Project: Ignite
>  Issue Type: Improvement
>Affects Versions: 2.1
>Reporter: Andrey Kuznetsov
>Assignee: Andrey Kuznetsov
>Priority: Minor
> Fix For: 2.5
>
>
> The method is not thread-safe unless actual parameter is currentThread.
> Let future state is a list of listeners and two concurrent threads are 
> removing two adjacent non-root listener nodes from list simultaneously by 
> calling {{unregisterWaiter()}}. Then data race is possible: one of these 
> listeners can survive its removal. If the listener is a thread waiting for 
> completion in {{get0()}} then this race leads at worst case to 1 extra call 
> to {{LockSupport.park()}}, and it's negligible. Otherwise we deal with an 
> arbitrary listener, and its {{apply()}} will be called twice.
> To be precise, this Jira issue does not relate to any existing bug, but it 
> eliminates fragile construct that can explode on future chages/refactorings.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (IGNITE-6186) Remove redundant parameter of GridFutureAdapter::unregisterWaiter()

2017-11-28 Thread Andrey Kuznetsov (JIRA)

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

Andrey Kuznetsov updated IGNITE-6186:
-
Description: 
The method is not thread-safe unless actual parameter is currentThread.

Let future state is a list of listeners and two concurrent threads are removing 
two adjacent non-root listener nodes from list simultaneously by calling 
{{unregisterWaiter()}}. Then data race is possible: one of these listeners can 
survive its removal. If the listener is a thread waiting for completion in 
{{get0()}} then this race leads at worst case to 1 extra call to 
{{LockSupport.park()}}, and it's negligible. Otherwise we deal with an 
arbitrary listener, and its {{apply()}} will be called twice.

To be precise, this Jira issue does not relate to any existing bug, but it 
eliminates fragile construct that can explode on future chages/refactorings.

  was:
The method is not thread-safe unless actual parameter is currentThread.

Let future state is a list of listeners and two concurrent threads are removing 
two adjacent non-root listener nodes from list simultaneously by calling 
{{unregisterWaiter()}}. Then data race is possible: one of these listeners can 
survive its removal. If the listener is a thread waiting for completion in 
{{get0()}} then this race leads at worst case to 1 extra call to 
{{LockSupport.park()}}, and it's negligible. Otherwise we deal with an 
arbitrary listener, and its {{apply()}} will be called twice.


> Remove redundant parameter of GridFutureAdapter::unregisterWaiter()
> ---
>
> Key: IGNITE-6186
> URL: https://issues.apache.org/jira/browse/IGNITE-6186
> Project: Ignite
>  Issue Type: Improvement
>Affects Versions: 2.1
>Reporter: Andrey Kuznetsov
>Assignee: Andrey Kuznetsov
>Priority: Minor
>
> The method is not thread-safe unless actual parameter is currentThread.
> Let future state is a list of listeners and two concurrent threads are 
> removing two adjacent non-root listener nodes from list simultaneously by 
> calling {{unregisterWaiter()}}. Then data race is possible: one of these 
> listeners can survive its removal. If the listener is a thread waiting for 
> completion in {{get0()}} then this race leads at worst case to 1 extra call 
> to {{LockSupport.park()}}, and it's negligible. Otherwise we deal with an 
> arbitrary listener, and its {{apply()}} will be called twice.
> To be precise, this Jira issue does not relate to any existing bug, but it 
> eliminates fragile construct that can explode on future chages/refactorings.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (IGNITE-6186) Remove redundant parameter of GridFutureAdapter::unregisterWaiter()

2017-11-28 Thread Andrey Kuznetsov (JIRA)

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

Andrey Kuznetsov updated IGNITE-6186:
-
Description: 
The method is not thread-safe unless actual parameter is currentThread.

Let future state is a list of listeners and two concurrent threads are removing 
two adjacent non-root listener nodes from list simultaneously by calling 
{{unregisterWaiter()}}. Then data race is possible: one of these listeners can 
survive its removal. If the listener is a thread waiting for completion in 
{{get0()}} then this race leads at worst case to 1 extra call to 
{{LockSupport.park()}}, and it's negligible. Otherwise we deal with an 
arbitrary listener, and its {{apply()}} will be called twice.

  was:The method is not thread-safe unless actual parameter is currentThread.


> Remove redundant parameter of GridFutureAdapter::unregisterWaiter()
> ---
>
> Key: IGNITE-6186
> URL: https://issues.apache.org/jira/browse/IGNITE-6186
> Project: Ignite
>  Issue Type: Improvement
>Affects Versions: 2.1
>Reporter: Andrey Kuznetsov
>Assignee: Andrey Kuznetsov
>Priority: Minor
>
> The method is not thread-safe unless actual parameter is currentThread.
> Let future state is a list of listeners and two concurrent threads are 
> removing two adjacent non-root listener nodes from list simultaneously by 
> calling {{unregisterWaiter()}}. Then data race is possible: one of these 
> listeners can survive its removal. If the listener is a thread waiting for 
> completion in {{get0()}} then this race leads at worst case to 1 extra call 
> to {{LockSupport.park()}}, and it's negligible. Otherwise we deal with an 
> arbitrary listener, and its {{apply()}} will be called twice.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (IGNITE-6186) Remove redundant parameter of GridFutureAdapter::unregisterWaiter()

2017-09-26 Thread Vladimir Ozerov (JIRA)

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

Vladimir Ozerov updated IGNITE-6186:

Fix Version/s: (was: 2.3)

> Remove redundant parameter of GridFutureAdapter::unregisterWaiter()
> ---
>
> Key: IGNITE-6186
> URL: https://issues.apache.org/jira/browse/IGNITE-6186
> Project: Ignite
>  Issue Type: Improvement
>Affects Versions: 2.1
>Reporter: Andrey Kuznetsov
>Priority: Minor
>
> The method is not thread-safe unless actual parameter is currentThread.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)