Ivan Bessonov created IGNITE-27192:
--------------------------------------

             Summary: Optimize catalog access in CatalogManagerImpl
                 Key: IGNITE-27192
                 URL: https://issues.apache.org/jira/browse/IGNITE-27192
             Project: Ignite
          Issue Type: Improvement
            Reporter: Ivan Bessonov
            Assignee: Ivan Bessonov


Reading the catalog by its version or timestamp is a hot operation that is 
executed very frequently:
{code:java}
org.apache.ignite.internal.catalog.CatalogManagerImpl#catalog

org.apache.ignite.internal.catalog.CatalogManagerImpl#activeCatalog {code}
Current implementation (two mentioned methods) wastes resources on primitive 
types boxing, and then on multiple volatile memory accesses. I propose 
replacing current structures with COW thread-unsafe maps with primitive key 
types, in order to maximize the performance of reading.

Performance of writing shouldn't suffer that much, there are will rarely be 
more than a few hundred catalog versions to copy. But if we ever encounter this 
problem we will replaceĀ 
{{Primitive2ObjectSortedMap}} with a more fitting structure that will share all 
the same benefits, but allow for a faster updates.



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

Reply via email to