Hello Ivan,

Well, EVT_CACHE_REBALANCE_PART_LOADED is triggered when the corresponding
partition is fully rebalanced and moved into the "OWNING" state,
and so, invoking Affinity#isPrimaryOrBackup(ignite.cluster().localNode(),
key) on this node should return "true".
to be more precise, this partition is treated as a "backup" until a new PME
(which is triggered by a Late Affinity Assignment) that can switch the
partition to "primary".

Thanks,
S.

пт, 29 янв. 2021 г. в 00:49, <[email protected]>:

> Dear Igniters,
>
> Could someone please clarify if it is guaranteed that the Affinity
> (GridCacheAffinityImpl) will have the most up-to-date information about
> partitions distribution and the following scenario is impossible:
>
>
>   1.  We have a registered listener of EVT_CACHE_REBALANCE_PART_LOADED and
> EVT_CACHE_REBALANCE_PART_UNLOADED events
>   2.  We have a ContinuousQuery that keeps track of all the new cache
> entries (cluster-wide)
>   3.  The events listener gets the Partition Loaded Event
>   4.  The cache listener receives a new cache entry that belongs to the
> loaded partition and invokes
> Affinity#isPrimaryOrBackup(ignite.cluster().localNode(), key) and gets the
> FALSE response
>
> In other words, is it guaranteed that the information about partitions
> distribution will be adjusted strictly before the first Partition Loaded
> Event will be distributed to listeners?
>
> Best regards,
> Ivan
>

Reply via email to