tolbertam commented on code in PR #4558:
URL: https://github.com/apache/cassandra/pull/4558#discussion_r2836727648
##########
src/java/org/apache/cassandra/cql3/statements/schema/TableAttributes.java:
##########
@@ -58,6 +59,10 @@ public final class TableAttributes extends
PropertyDefinitions
public void validate()
{
validate(validKeywords, obsoleteKeywords);
+
+ if (hasOption(AUTO_REPAIR) &&
!CassandraRelevantProperties.AUTOREPAIR_ENABLE.getBoolean())
Review Comment:
It looks like if someone were to make a change to the `auto_repair` config
on a table it does prevent a node from starting up because of an unknown column
in the serialization header:
> ERROR [SSTableBatchOpen:1] 2026-02-21T22:14:11,365
DefaultFSErrorHandler.java:129 - Exiting forcefully due to file system
exception on startup, disk failure policy "stop"
org.apache.cassandra.io.sstable.CorruptSSTableException: Corrupted:
/Users/tolbertam/.ccm/auto_repair_off/node2/data0/system_schema/tables-afddfb9dbc1e30688056eed6c302ba09/nb-17-big
at
org.apache.cassandra.io.sstable.format.SSTableReaderLoadingBuilder.build(SSTableReaderLoadingBuilder.java:111)
at
org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:415)
at
org.apache.cassandra.io.sstable.format.SSTableReader.open(SSTableReader.java:371)
at
org.apache.cassandra.io.sstable.format.SSTableReader.lambda$openAll$4(SSTableReader.java:432)
at org.apache.cassandra.concurrent.FutureTask$2.call(FutureTask.java:124)
at
org.apache.cassandra.concurrent.FutureTask.call(FutureTask.java:61)
at
org.apache.cassandra.concurrent.FutureTask.run(FutureTask.java:71)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.IllegalArgumentException:
org.apache.cassandra.exceptions.UnknownColumnException: Unknown column
auto_repair during deserialization
at
org.apache.cassandra.io.sstable.format.StatsComponent.serializationHeader(StatsComponent.java:89)
at
org.apache.cassandra.io.sstable.format.big.BigSSTableReaderLoadingBuilder.openComponents(BigSSTableReaderLoadingBuilder.java:78)
at
org.apache.cassandra.io.sstable.format.big.BigSSTableReaderLoadingBuilder.openComponents(BigSSTableReaderLoadingBuilder.java:58)
at
org.apache.cassandra.io.sstable.format.SSTableReaderLoadingBuilder.build(SSTableReaderLoadingBuilder.java:92)
... 10 common frames omitted
Caused by: org.apache.cassandra.exceptions.UnknownColumnException: Unknown
column auto_repair during deserialization
at
org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:325)
at
org.apache.cassandra.io.sstable.format.StatsComponent.serializationHeader(StatsComponent.java:85)
... 13 common frames omitted
If I then add the flag back the node starts up fine.
Upon looking further at sstables via sstabledump, it looks like the
auto_repair column is serialized for a each table regardless of whether its
explicitly configured, but it does feel like a 'There's no going back' after
you've passed in the flag, but that's ok as you can still turn the feature off
via yaml.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]