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

Ivan Bessonov updated IGNITE-21196:
-----------------------------------
    Reviewer: Vladislav Pyatkov  (was: Vladislav Pyatkov)

> PrimaryReplicaEvent handling is inefficient
> -------------------------------------------
>
>                 Key: IGNITE-21196
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21196
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Ivan Bessonov
>            Assignee: Ivan Bessonov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently, every partition replica listener has its own set of instances of 
> {{PrimaryReplicaEvent}} listeners. In 
> {{LeaseTracker.UpdateListener#onUpdate}} we create these events in a loop.
>  
> This results in 2 nested loops, which might be extremely inefficient if we 
> have a lot of replicas on the node. Most of iterations will do nothing 
> because the following condition won't pass:
> {{!replicationGroupId.equals(evt.groupId())}}
>  
> I suggest subscribing to these events in {{ReplicaManager}} and perform 
> necessary filtering in advance. Such change will greatly improve the 
> performance of lease update watch event processing



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to