You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vyacheslav Koptilin (Jira)" <ji...@apache.org> on 2026/03/05 06:49:00 UTC

[jira] [Created] (IGNITE-28066) Caching a topology snapshot in a heap

Vyacheslav Koptilin created IGNITE-28066:
--------------------------------------------

             Summary: Caching a topology snapshot in a heap
                 Key: IGNITE-28066
                 URL: https://issues.apache.org/jira/browse/IGNITE-28066
             Project: Ignite
          Issue Type: Improvement
            Reporter: Vyacheslav Koptilin


Currently, `LogicalTopologyImpl` always reads a topology snapshot from the storage:

{code:java|title=LogicalTopologyImpl}
    @Override
    public LogicalTopologySnapshot getLogicalTopology() {
        return readLogicalTopology();
    }

    private LogicalTopologySnapshot readLogicalTopology() {
        byte[] bytes = storage.get(LOGICAL_TOPOLOGY_KEY);

        return bytes == null ? LogicalTopologySnapshot.INITIAL
                : VersionedSerialization.fromBytes(bytes, LogicalTopologySnapshotSerializer.INSTANCE);
    }
{code}

Reading from disk and then deserializing the object can be slow. So, it makes sense to cache this value in a heap and read only once during class initialization.



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