mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
The `service::topology_features` struct was introduced in #14955. Its purpose was to make it possible to load cluster features from `system.topology` before schema commitlog replay. It contains a map from host ID to supported feature set for every normal node. In order not to duplicate logic for loading features, the `service::topology`'s `replica_state`s do not hold a set of supported features and users are supposed to refer to the features in `topology_features`, which is a field in the `topology` struct. However, accessing features is quite awkward now. This commit adds `supported_features` field back to the `replica_state` struct and the `load_topology_state` function initializes them properly. The logic duplication needed to initialize them is quite small and the drawbacks that come with it are outweighed by the fact that we now can refer to node's supported features in a more natural way. The `topology_features` struct is no longer a field of `topology`, but it still exists for the purpose of the feature check that happens before commitlog replay.