[ https://issues.apache.org/jira/browse/CASSANDRA-14912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16701897#comment-16701897 ]
Sam Tunnicliffe commented on CASSANDRA-14912: --------------------------------------------- Adding the first {{isComplex}} check (as per your branch) does help here because the dropped definition is complex. Adding the second {{isComplex}} check on that and constructing a fake definition if it isn't is probably worth it to deal with the rare case where a column has been dropped and re-added multiple times. Pushed a second commit with those additions & the test extended to cover them. Although we *could* live without the {{isDroppedComplexDeletion}} check, I've left it in and extended the test to check both when it fails and succeeds. Though this does make the verification of results somewhat finicky, it's maybe useful in documenting the expected behaviour in these edge cases. > LegacyLayout errors on collection tombstones from dropped columns > ----------------------------------------------------------------- > > Key: CASSANDRA-14912 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14912 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths > Reporter: Sam Tunnicliffe > Assignee: Sam Tunnicliffe > Priority: Major > Fix For: 3.0.x, 3.11.x > > > When reading legacy sstables in 3.0, the dropped column records in table > metadata are not checked when a collection tombstone is encountered. This > means that if a collection column was dropped and a new column with the same > name but a non-collection type subsequently added prior to upgrading to 3.0, > reading any sstables containing the collection data will error. This includes > reads done by upgradesstables, which makes recovery from this situation > without losing data impossible. Scrub will clean the affected tables, but any > valid data will also be discarded. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org