[ https://issues.apache.org/jira/browse/CASSANDRA-20449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936359#comment-17936359 ]
Caleb Rackliffe edited comment on CASSANDRA-20449 at 3/19/25 3:38 PM: ---------------------------------------------------------------------- |[5.0|https://github.com/apache/cassandra/pull/3987]| [CI TODO] | |[trunk|https://github.com/apache/cassandra/pull/3992]|CI TODO| was (Author: maedhroz): |[5.0|https://github.com/apache/cassandra/pull/3987]| [^ci_summary.html] | |[trunk|https://github.com/apache/cassandra/pull/3992]|CI TODO| > 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 > Fix For: 5.0.x, 5.x > > Attachments: ci_summary.html, result_details.tar.gz > > Time Spent: 1h 50m > Remaining Estimate: 0h > > 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