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

Amelchev Nikita updated IGNITE-12017:
-------------------------------------
    Description: 
When the GridDhtPartitionsExchangeFuture#onEvent method called it releases 
event latch. It means that we can't change the initial event (firstDiscoEvt). 
Otherwise, it breaks the exchange logic.
 I have checked on TC and this method may be called twice with one event 
(identical references).
 The following assert is correct:
{noformat}
assert exchId.equals(this.exchId) && (firstDiscoEvt == null || firstDiscoEvt == 
discoEvt);
{noformat}
Need to refactor the method usages and avoid confusing developers that the 
first event may be changed.

  was:
When the GridDhtPartitionsExchangeFuture#onEvent method called it releases init 
latch. It means that we can't change the initial event (firstDiscoEvt). 
Otherwise, it breaks the exchange logic.
I have checked on TC and this method may be called twice with one event 
(identical references).
The following assert is correct:
{noformat}
assert exchId.equals(this.exchId) && (firstDiscoEvt == null || firstDiscoEvt == 
discoEvt);
{noformat}
Need to refactor the method usages and avoid confusing developers that the 
first event may be changed.


> Avoid calling GridDhtPartitionsExchangeFuture#onEvent more than once.
> ---------------------------------------------------------------------
>
>                 Key: IGNITE-12017
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12017
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Amelchev Nikita
>            Priority: Major
>
> When the GridDhtPartitionsExchangeFuture#onEvent method called it releases 
> event latch. It means that we can't change the initial event (firstDiscoEvt). 
> Otherwise, it breaks the exchange logic.
>  I have checked on TC and this method may be called twice with one event 
> (identical references).
>  The following assert is correct:
> {noformat}
> assert exchId.equals(this.exchId) && (firstDiscoEvt == null || firstDiscoEvt 
> == discoEvt);
> {noformat}
> Need to refactor the method usages and avoid confusing developers that the 
> first event may be changed.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to