[
https://issues.apache.org/jira/browse/IGNITE-27192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Bessonov updated IGNITE-27192:
-----------------------------------
Description:
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.
EDIT: sorted map does not have an API to read "closest" key without extra
allocations. We should make our own implementactions.
was:
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.
> 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
> Priority: Major
> Labels: ignite-3
>
> 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.
> EDIT: sorted map does not have an API to read "closest" key without extra
> allocations. We should make our own implementactions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)