mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 18:40:38 +00:00
In https://github.com/scylladb/scylladb/pull/18729, we introduced a new statement tenant `$maintenance`, but the change wasn't protected by any cluster feature. This wasn't a problem for OSS, since unknown isolation cookie just uses default scheduling group. However, in enterprise that leads to creating a service level on not-upgraded nodes, which may end up in an error if user create maximum number of service levels. This patch adds a cluster feature to guard adding the new tenant. It's done in the way to handle two upgrade scenarios: - version without `$maintenance` tenant -> version with `$maintenance` tenant guarded by a feature - version with `$maintenance` tenant but not guarded by a feature -> version with `$maintenance` tenant guarded by a feature The PR adds `enabled` flag to statement tenants. This way, when the tenant is disabled, it cannot be used to create a connection, but it can be used to accept an incoming connection. The `$maintenance` tenant is added to the config as disabled and it gets enabled once the corresponding feature is enabled. Fixes scylladb/scylladb#20070 Refs scylladb/scylla-enterprise#4403 Closes scylladb/scylladb#19802 * github.com:scylladb/scylladb: message/messaging_service: guard adding maintenance tenant under cluster feature message/messaging_service: add feature_service dependency message/messaging_service: add `enabled` flag to statement tenants