[ https://issues.apache.org/jira/browse/CASSANDRA-13294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15898532#comment-15898532 ]
Stefania commented on CASSANDRA-13294: -------------------------------------- Thank you for the review and the test. Committed to 3.0 as {{1ba68a1e5d681c091e2c53e7720029f10591e7ef}} and merged into 3.11. Then merged into trunk with {{-s ours}}. > Possible data loss on upgrade 2.1 - 3.0 > --------------------------------------- > > Key: CASSANDRA-13294 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13294 > Project: Cassandra > Issue Type: Bug > Reporter: Marcus Eriksson > Assignee: Stefania > Priority: Blocker > Fix For: 3.0.x, 3.11.x > > > After finishing a compaction we delete the compacted away files. This is done > [here|https://github.com/apache/cassandra/blob/cassandra-3.0/src/java/org/apache/cassandra/db/lifecycle/LogFile.java#L328-L337] > which uses > [this|https://github.com/apache/cassandra/blob/cassandra-3.0/src/java/org/apache/cassandra/db/lifecycle/LogRecord.java#L265-L271] > to get the files - we get all files starting with {{absoluteFilePath}}. > Absolute file path is generated > [here|https://github.com/apache/cassandra/blob/cassandra-3.0/src/java/org/apache/cassandra/io/sstable/Descriptor.java#L142-L153]. > For 3.0 version files the filename looks like this: > {{/blabla/keyspace1/standard1-bdb031c0ff7b11e6940fdd0479dd8912/mc-1332-big}} > but for 2.1 version files, they look like this: > {{/blabla/keyspace1/standard1-bdb031c0ff7b11e6940fdd0479dd8912/keyspace1-standard1-ka-2}}. > The problem is then that if we were to finish a compaction including the > legacy file, we would actually delete all legacy files having a generation > starting with '2' -- This message was sent by Atlassian JIRA (v6.3.15#6346)