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

MerkleDb to monitor new data files if started in an existing default dir

Open
#26,032 0 comments 0 reactions 1 assignee Claimed by @thenswan View on GitHub
Platform Platform Virtual Map
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

This is a part of ZDT epic: https://github.com/hiero-ledger/hiero-consensus-node/issues/25820

When a new CN process is started for a version upgrade, its MerkleDb data source is created with an existing folder in `swirlds-tmp`, and it starts in a special mode (see https://github.com/hiero-ledger/hiero-consensus-node/issues/25991 for details). In this mode, the old CN process is still running, and the new process is in read-only mode (actually, even requests to read data should fail, so it should be better called "monitoring" mode).

The old process may create new data files (data flushes and compactions), and the new process should pick these files up. Index updates should not be an issue, since indices are shared between the two processes, but data files are not. There should be a file monitoring service to add new data files (for all three stores) to the corresponding data file collections in the new process. The new process should also monitor data source metadata changes, as the current leaf path range may change on every flush.

Once the new process takes ownership over the storage dir, this file monitoring service should be stopped, and data file compaction service should be started.

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.