mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 12:36:56 +00:00
We allow tables to be created with the ID property, mostly for advanced recovery cases. However, we need to validate that the ID doesn't match an existing one. We currently do this in database::add_column_family(), but this is already too late in the normal workflow: if we allow the schema change to go through, then it is applied to the system tables and loaded the next time the node boots, regardless of us throwing from database::add_column_family(). To fix this, we perform this validation when announcing a new table. Note that the check wasn't removed from database::add_column_family(); it's there since 2015 and there might have been other reasons to add it that are not related to the ID property. Refs #2059 Signed-off-by: Duarte Nunes <duarte@scylladb.com> Message-Id: <20181001230142.46743-1-duarte@scylladb.com>