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

2018-04-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-6186:


Github user andrey-kuznetsov closed the pull request at:

https://github.com/apache/ignite/pull/2749


> 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] [Commented] (IGNITE-6186) Remove redundant parameter of GridFutureAdapter::unregisterWaiter()

2018-03-30 Thread Andrey Gura (JIRA)

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

Andrey Gura commented on IGNITE-6186:
-

[~andrey-kuznetsov] LGTM. But I renamed methid to {{unregisterWaiter}} because 
it is symmetrical to {{registerWaiter}}. Merged to master branch.

> 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] [Commented] (IGNITE-6186) Remove redundant parameter of GridFutureAdapter::unregisterWaiter()

2017-09-26 Thread Andrey Kuznetsov (JIRA)

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

Andrey Kuznetsov commented on IGNITE-6186:
--

[~sboikov], please review my changes.

> 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.



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


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

2017-09-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-6186:


GitHub user andrey-kuznetsov opened a pull request:

https://github.com/apache/ignite/pull/2749

IGNITE-6186: Removed redundant parameter.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/andrey-kuznetsov/ignite ignite-6186

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/2749.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2749


commit 9646f442bb6327bb08c984c5e0caf0a9f7438640
Author: Andrey Kuznetsov 
Date:   2017-09-26T12:55:13Z

IGNITE-6186: Removed redundant parameter.




> 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.



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