mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
It doesn't make sense to create an empty CDC generation because it does not make sense to have a cluster with no tokens. Add a sanity check to cdc::make_new_generation_description which fails if somebody attempts to do that (i.e. when the set of current tokens + optionally bootstrapping node's tokens is empty). The function does not work correctly if it is misused, as we saw in scylladb/scylladb#23897. While the function should not be misused in the first place, it's better to throw an exception rather than crash - especially that this crash could happen on the topology coordinator.