hyperledger / hyperledger/fabric

The channel participation "Remove" does not clear the old etcdraft WAL & snapshots directories

Open
#4,016 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
16.7k
Forks
9.1k
Avg merge
5h 38m
Merged PRs (30d)
26

Description

The channel participation "Remove" removes the ledger but does not clear the old etcdraft WAL & snapshots directories that were used by the consenter.

For example, starting a node with raft-ID=1, removing it, and joining it again, this time with raft-ID=4, on a WAL/snapshot created in the past by ID=1 may create problems. This may work, but is highly unrecommended, as a new raft node with a new ID should start fresh without a WAL.

Another example, creating a 3-node channel "mychannel" on o1, o2, o3. Removing the channel completely from all, creating a 1-node channel with the same name on o1. The old WAL is completely incompatible as it has a 3-node membership from a past incarnation of the channel.

As this is relevant to other consensus types as well, the cleanup should abstracted such that every type would need to implement its own cleanup.

See #3992

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.