[ https://issues.apache.org/jira/browse/CASSANDRA-18153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17676316#comment-17676316 ]
Adriano Bonacin commented on CASSANDRA-18153: --------------------------------------------- Storage service is not yet initiated during CommitLogReplay and MetadataCollection calls StorageService.instance.getLocalHostUUID. [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java#L127] StorageService.instance.getLocalHostUUID() will return null and all Memtables will be flushed without this information. Next time cassandra starts and these SStables are present, this test will fail because originatingHostId is null: [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L337] {{ UUID originatingHostId = reader.getSSTableMetadata().originatingHostId;}} {{ if (originatingHostId != null && originatingHostId.equals(localhostId))}} {{ builder.addAll(reader.getSSTableMetadata().commitLogIntervals);}} {{ else}} {{ skippedSSTables.add(reader.getFilename());}} I thought of implementing it using same strategy as CommitLog.java [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLog.java#L211] {{ Optional.ofNullable(StorageService.instance.getLocalHostUUID()).orElseGet(SystemKeyspace::getLocalHostId);}} > Memtable being flushed without hostId in version "me" and newer during > CommitLogReplay > -------------------------------------------------------------------------------------- > > Key: CASSANDRA-18153 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18153 > Project: Cassandra > Issue Type: Bug > Reporter: Adriano Bonacin > Assignee: Adriano Bonacin > Priority: Normal > > On ticket CASSANDRA-16619 some files were changed to allow Cassandra to store > HostID in the new "me" SSTable version. > But SSTables flushed during CommitLogReplay miss this HostID info. > > In the next Cassandra startup, if these SSTables were still present, > system.log will show: > {{WARN Origin of 3 sstables is unknown or doesn't match the local node; > commitLogIntervals for them were ignored}} > {{WARN }}{{{}Origin of 3 sstables is unknown or doesn't match the local node; > commitLogIntervals for them were ignored{}}}{{{}{}}}{{ }} > > And debug.log will show a list of SSTables, witch can include "md" and "me" > version (before upgradesstables): > > {{Ignored commitLogIntervals from the following sstables: > [/var/lib/cassandra/data/system/compaction_history-b4dbb7b4dc493fb5b3bfce6e434832ca/me-3-big-Data.db, > > /var/lib/cassandra/data/system/compaction_history-b4dbb7b4dc493fb5b3bfce6e434832ca/md-1-big-Data.db, > > /var/lib/cassandra/data/system/compaction_history-b4dbb7b4dc493fb5b3bfce6e434832ca/md-2-big-Data.db]}} > > https://issues.apache.org/jira/browse/CASSANDRA-16619 -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org