hiero-ledger / hiero-ledger/hiero-consensus-node

Memory leak in MerkleDb

Open
#9,782 1 comment 0 reactions 0 assignees View on GitHub
Platform Platform Data Structures Platform Virtual Map Stability
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

### Description

`MerkleDb.getInstance(Path)` creates a new instance and adds it to a static map. Each snapshot, f.e., creates a new entry.
Entries are never removed from the map creating a memory leak.

### Steps to reproduce

Run `jmap -histo:live` to see that the number of `MerkleDb` instances increases over time (with every saved state).

### Additional context

_No response_

### Hedera network

other

### Version

v0.44.0-alpha.2

### Operating system

Linux

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.