我正在尝试将我的 3 节点 Cassandra 集群从版本 3.11.13 升级到 4.1.5。
启动升级节点后出现此错误:
ERROR [main] 2024-06-20 08:48:23,708 CassandraDaemon.java:915 - Exception encountered during startup
java.lang.AssertionError: null
at org.apache.cassandra.schema.TableMetadata$CompactTableMetadata.getCompactValueColumn(TableMetadata.java:1515)
at org.apache.cassandra.schema.TableMetadata$CompactTableMetadata.<init>(TableMetadata.java:1350)
at org.apache.cassandra.schema.TableMetadata$Builder.build(TableMetadata.java:747)
at org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:943)
at org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:898)
at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:857)
at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:848)
at org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:836)
at org.apache.cassandra.schema.Schema.loadFromDisk(Schema.java:132)
at org.apache.cassandra.schema.Schema.loadFromDisk(Schema.java:121)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:285)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:759)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:893)
我发现这个问题将 Cassandra 3.11.8 升级到 4.1.0 在启动时加载模式时返回“AssertionError:null”,建议删除 COMPACT STORAGE。
系统键空间中只有一个 COMPACT STORAGE:
DESCRIBE TABLE system.hints
CREATE TABLE system.hints (
target_id uuid,
hint_id timeuuid,
message_version int,
mutation blob,
PRIMARY KEY (target_id, hint_id, message_version)
) WITH COMPACT STORAGE
AND CLUSTERING ORDER BY (hint_id ASC, message_version ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = '*DEPRECATED* hints awaiting delivery'
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'enabled': 'false', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.0
AND default_time_to_live = 0
AND gc_grace_seconds = 0
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 3600000
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
不幸的是我不能放弃它:
cqlsh> ALTER TABLE system.hints DROP COMPACT STORAGE;
Unauthorized: Error from server: code=2100 [Unauthorized] message="system keyspace is not user-modifiable."
我甚至无法将节点降级回 3.11.13:
ERROR [main] 2024-06-20 08:38:07,157 CassandraDaemon.java:803 - Detected unreadable sstables /var/lib/cassandra/data/system/local/nb-244-big-Statistics.db,/var/lib/cassandra/data/system/local/nb-244-big-Data.db,/var/lib/cassandra/data/system/local/nb-244-big-Summary.db,/var/
lib/cassandra/data/system/local/nb-244-big-CompressionInfo.db,/var/lib/cassandra/data/system/local/nb-244-big-Index.db,/var/lib/cassandra/data/system/local/nb-244-big-Filter.db, please check NEWS.txt and ensure that you have upgraded through all required intermediate version
s, running upgradesstables
在我的其他 cassandra 集群中,升级顺利,但表 system.hints 不存在。
有人知道如何摆脱这种情况吗?