dragonflydb / dragonflydb/dragonfly
Reject invalid cluster node health values instead of defaulting to online
- Dominant language
- C++
- Stars
- 31.6k
- Forks
- 1.3k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 137
Description
## Problem
`ClusterExtendedNodeInfo::health` defaults to `ONLINE`. When `health` is not a string or contains
an unknown value, `ParseClusterNode` logs an error but still returns the node.
For example, `"health": "faill"` is accepted as `ONLINE`. The replica may consequently appear in
`CLUSTER SLOTS` as a healthy read target.
## References
https://github.com/dragonflydb/dragonfly/blob/980c70331d194d7133079917668fec269444c65c/src/server/cluster/cluster_defs.h#L108-L116
https://github.com/dragonflydb/dragonfly/blob/980c70331d194d7133079917668fec269444c65c/src/server/cluster/cluster_config.cc#L260-L282
https://github.com/dragonflydb/dragonfly/blob/980c70331d194d7133079917668fec269444c65c/docs/cluster-node-health.md#L34-L48
Contributor guide
Research direction
Start with ParseClusterNode in src/server/cluster/cluster_config.cc and compare its handling with ClusterExtendedNodeInfo::health in src/server/cluster/cluster_defs.h. Check the documented health values in docs/cluster-node-health.md. Done means non-string or unknown health values are rejected instead of producing an online node, while valid values retain their documented behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100