Ivan Bessonov created IGNITE-21196:
--------------------------------------
Summary: 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
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)