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

Evgeny Stanilovsky updated IGNITE-18897:
----------------------------------------
    Fix Version/s: 3.2
                       (was: 3.1)

> TopologyService must cache local ClusterNode.
> ---------------------------------------------
>
>                 Key: IGNITE-18897
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18897
>             Project: Ignite
>          Issue Type: Improvement
>          Components: networking
>            Reporter: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.2
>
>
> As of now, ScaleCudeTopologyService.localMember() creates a new ClusterNode 
> instance on each call.
> This method used widely in the project, so it make sense to avoid unwanted 
> instantiations.
> Moreover, every message is checked if it is sent to a local node or not, and 
> uses topologyService.localMember().
> We can get faster equality checks if local ClusterNode will be a single 
> object.
> Let's cache ClusterNode object for the local node, and maybe do the same for 
> all objects using `intern()` ideas.
> See how it is is done in RelDataTypeFactoryImpl.DATATYPE_CACHE in Calcite (it 
> uses Interners.newWeakInterner() from Guava)  



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

Reply via email to