Konstantin Orlov created IGNITE-28493:
-----------------------------------------

             Summary: Reduce contention in RemotelyTriggeredResourceRegistry
                 Key: IGNITE-28493
                 URL: https://issues.apache.org/jira/browse/IGNITE-28493
             Project: Ignite
          Issue Type: Improvement
          Components: transactions ai3
            Reporter: Konstantin Orlov
            Assignee: Konstantin Orlov


As for now, all resource tracking on per-host basis is done inside `compute` 
methods of hash map. For example:
{code}
    private void addRemoteHostResource(UUID remoteHostId, 
FullyQualifiedResourceId resourceId) {
        remoteHostsToResources.compute(remoteHostId, (k, v) -> {
            if (v == null) {
                v = ConcurrentHashMap.newKeySet();
            }

            v.add(resourceId);

            return v;
        });
    }
{code}

Given that number of nodes is relatively small, and we use concurrent 
collections as values anyway, such an approach creates unnecessary contention 
on hot path.



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

Reply via email to