mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-29 20:57:00 +00:00
The goal of this patch is to fix issue #5280, a rather serious Alternator bug, where Scylla fails to restart when an Alternator table has secondary indexes (LSI or GSI). Traditionally, Cassandra allows table names to contain only alphanumeric characters and underscores. However, most of our internal implementation doesn't actually have this restriction. So Alternator uses the characters ':' and '!' in the table names to mark global and local secondary indexes, respectively. And this actually works. Or almost... This patch fixes a problem of listing, during boot, the sstables stored for tables with such non-traditional names. The sstable listing code needlessly assumes that the *directory* name, i.e., the CF names, matches the "\w+" regular expression. When an sstable is found in a directory not matching such regular expression, the boot fails. But there is no real reason to require such a strict regular expression. So this patch relaxes this requirement, and allows Scylla to boot with Alternator's GSI and LSI tables and their names which include the ":" and "!" characters, and in fact any other name allowed as a directory name. Fixes #5280. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <20191114153811.17386-1-nyh@scylladb.com>