You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternator limits table names to 222 characters, because a longer name would result in a directory name longer than 255 characters, and an IO failure - which potentially crashes.
However, when enabling Alternator Streams, a _scylla_cdc_log suffix (cdc_log_suffix in cdc/log.cc) is added to the table's name to create a new table. Unfortunately, if the resulting name is longer than 222 characters, today Scylla experiences an IO error and shuts down. Each of the the following two test shuts down Scylla today (both are added in test/alternator/test_streams.py in pull request #24597):
# When Alternator enables streams, CDC creates a new table whose name is the# same as the existing table with the suffix "_scylla_cdc_log". Let's check# that if the table's name is already as long as it can be, we can still# enable streams without any disasterous I/O error.# We have two versions of this test - one with the stream created with the# table, and one with the stream added to the existing table.# Reproduces #24598deftest_stream_table_name_length_222_create(dynamodb):
withnew_test_table(dynamodb, name=padded_name(222),
Tags=TAGS,
StreamSpecification={'StreamEnabled': True, 'StreamViewType': 'KEYS_ONLY'},
KeySchema=[ { 'AttributeName': 'p', 'KeyType': 'HASH' } ],
AttributeDefinitions=[ { 'AttributeName': 'p', 'AttributeType': 'S' }, ]
) astable:
passdeftest_stream_table_name_length_222_update(dynamodb):
withnew_test_table(dynamodb, name=padded_name(222),
Tags=TAGS,
KeySchema=[ { 'AttributeName': 'p', 'KeyType': 'HASH' } ],
AttributeDefinitions=[ { 'AttributeName': 'p', 'AttributeType': 'S' }, ]
) astable:
table.update(StreamSpecification={'StreamEnabled': True, 'StreamViewType': 'KEYS_ONLY'});
# DynamoDB doesn't allow deleting the base table while the stream# is in the process of being addedwait_for_active_stream(dynamodbstreams, table)
Scylla is shut down after the following message:
ERROR 2025-06-22 15:16:26,643 [shard 0: gms] raft - [8062f308-8b33-4e46-b740-0bc8fa473f50]
applier fiber stopped because of the error: std::_Nested_exception<raft::state_machine_error>
(State machine error at raft/server.cc:1369): storage_io_error (Storage I/O error: 36: filesystem error:
mkdir failed: File name too long [/tmp/scylla-test-1565101/data/alternator_alternator_Test_1750594586633xxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx/alternator_Test_1750594586633xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
We need to fix this bug in one of two ways:
If the table's name is too long, one will simply be unable to enable streams on it, but get a clean error - not a crash. We already do a similar thing for GSI/LSI: There the sum of table name and GSI/LSI name needs to be up to 221/220 and if it isn't, you just can't add that GSI/LSI.
I think I prefer option 2. It means that some extremely long table names which were possible in the current release will no longer be possible and docs/alternator/compatibility.md (added in #24597) will needs to be updated, but I don't think anyone would shed any tears. Users do not really use such extremely long names. But if we don't want to risk any type of backward incompatibility, then option 1 is a good option.
Alternator limits table names to 222 characters, because a longer name would result in a directory name longer than 255 characters, and an IO failure - which potentially crashes.
However, when enabling Alternator Streams, a
_scylla_cdc_logsuffix (cdc_log_suffix in cdc/log.cc) is added to the table's name to create a new table. Unfortunately, if the resulting name is longer than 222 characters, today Scylla experiences an IO error and shuts down. Each of the the following two test shuts down Scylla today (both are added in test/alternator/test_streams.py in pull request #24597):Scylla is shut down after the following message:
We need to fix this bug in one of two ways:
I think I prefer option 2. It means that some extremely long table names which were possible in the current release will no longer be possible and docs/alternator/compatibility.md (added in #24597) will needs to be updated, but I don't think anyone would shed any tears. Users do not really use such extremely long names. But if we don't want to risk any type of backward incompatibility, then option 1 is a good option.