mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 17:10:35 +00:00
This PR collects followups described in #14972: - The `system.topology` table is now flushed every time feature-related columns are modified. This is done because of the feature check that happens before the schema commitlog is replayed. - The implementation now guarantees that, if all nodes support some feature as described by the `supported_features` column, then support for that feature will not be revoked by any node. Previously, in an edge case where a node is the last one to add support for some feature `X` in `supported_features` column, crashes before applying/persisting it and then restarts without supporting `X`, it would be allowed to boot anyway and would revoke support for the `X` in `system.topology`. The existing behavior, although counterintuitive, was safe - the topology coordinator is responsible for explicitly marking features as enabled, and in order to enable a feature it needs to perform a special kind of a global barrier (`barrier_after_feature_update`) which only succeeds after the node has updated its features column - so there is no risk of enabling an unsupported feature. In order to make the behavior less confusing, the node now will perform a second check when it tries to update its `supported_features` column in `system.topology`. - The `barrier_after_feature_update` is removed and the regular global `barrier` topology command is used instead. The `barrier` handler now performs a feature check if the node did not have a chance to verify and update its cluster features for the second time. JOIN_NODE rpc will be sent separately as it is a big item on its own. Fixes: #14972 Closes #15168 * github.com:scylladb/scylladb: test: topology{_experimental_raft}: don't stop gracefully in feature tests storage_service: remove _topology_updated_with_local_metadata topology_coordinator: remove barrier_after_feature_update topology_coordinator: perform feature check during barrier storage_service: repeat the feature check after read barrier feature_service: introduce unsupported_feature_exception feature_service: move startup feature check to a separate function topology_coordinator: account for features to enable in should_preempt_balancing group0_state_machine: flush system.topology when updating features columns