[ https://issues.apache.org/jira/browse/CASSANDRA-20449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936349#comment-17936349 ]
Caleb Rackliffe commented on CASSANDRA-20449: --------------------------------------------- This almost certainly applies to 5.0, but need to check 4.1 and 4.0 as well... > Serialization can lose complex deletions in a mutation with multiple > collections in a row > ----------------------------------------------------------------------------------------- > > Key: CASSANDRA-20449 > URL: https://issues.apache.org/jira/browse/CASSANDRA-20449 > Project: Apache Cassandra > Issue Type: Bug > Components: Legacy/Local Write-Read Paths, Local/Commit Log > Reporter: Caleb Rackliffe > Assignee: Caleb Rackliffe > Priority: Normal > > Here's a quick way to show that {{Mutation}} serialization can lose a complex > deletion that accompanies a collection replacement: > {noformat} > @BeforeClass > public static void setUpCluster() throws IOException > { > CLUSTER = init(Cluster.build(2).withConfig(config -> > config.set("hinted_handoff_enabled", > false).with(GOSSIP).with(NETWORK)).start()); > } > @Test > public void testMultipleSetsComplexDeletion() > { > CLUSTER.schemaChange(withKeyspace("CREATE TABLE %s.multi_collection (k > int, c int, s1 set<int>, s2 set<int>, s3 set<int>, PRIMARY KEY (k, c)) WITH > read_repair = 'NONE'")); > CLUSTER.coordinator(1).execute(withKeyspace("INSERT INTO > %s.multi_collection (k, c, s1, s2, s3) VALUES (?, ?, ?, ?, ?)"), > ConsistencyLevel.ALL, 0, 0, set(1), set(1), set(1)); > CLUSTER.coordinator(1).execute(withKeyspace("UPDATE %s.multi_collection > SET s2 = ?, s1 = s1 + ?, s3 = s3 + ? WHERE k = ? AND c = ?"), > ConsistencyLevel.ALL, set(2), set(2), set(2), 0, 0); > String select = withKeyspace("SELECT k, c, s1, s2, s3 FROM > %s.multi_collection"); > assertRows(CLUSTER.get(1).executeInternal(select), row(0, 0, set(1, 2), > set(2), set(1, 2))); > assertRows(CLUSTER.get(2).executeInternal(select), row(0, 0, set(1, 2), > set(2), set(1, 2))); > } > {noformat} > Node 1 loses the complex deletion during serialization, sends that to node 2, > and node 2 things the {{s2}} set replacement is an append/update. -- 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