You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Amelchev Nikita (JIRA)" <ji...@apache.org> on 2019/07/25 12:51:00 UTC

[jira] [Updated] (IGNITE-12017) Avoid calling GridDhtPartitionsExchangeFuture#onEvent more than once.

     [ 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)