[
https://issues.apache.org/jira/browse/CASSANDRA-20323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928950#comment-17928950
]
Caleb Rackliffe edited comment on CASSANDRA-20323 at 2/26/25 4:33 PM:
----------------------------------------------------------------------
|[trunk|https://github.com/apache/cassandra/pull/3916]| [^ci_summary.html] |
was (Author: maedhroz):
|[trunk|https://github.com/apache/cassandra/pull/3916]|Ci|
> Multi-node filtering query on static column appears to miss partition delete
> ----------------------------------------------------------------------------
>
> Key: CASSANDRA-20323
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20323
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Consistency/Coordination, Feature/SAI
> 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: 0.5h
> Remaining Estimate: 0h
>
> This test can be inserted into ReplicaFilteringProtectionTest or any other
> in-JVM dtest that has a 3 node cluster:
>
> {noformat}
> @Test
> public void testSingleStaticExpression()
> {
> cluster.schemaChange(withKeyspace("CREATE TABLE %s.single_static (pk0
> boolean, ck0 ascii, s1 tinyint static, v0 boolean, PRIMARY KEY (pk0, ck0)) " +
> "WITH CLUSTERING ORDER BY (ck0 ASC)
> AND read_repair = 'NONE'"));
> cluster.get(3).executeInternal(withKeyspace("UPDATE %s.single_static
> USING TIMESTAMP 1 SET v0 = false WHERE pk0 = true AND ck0 = 'D'"));
> cluster.get(1).executeInternal(withKeyspace("DELETE FROM
> %s.single_static USING TIMESTAMP 2 WHERE pk0 = true"));
> cluster.get(1).executeInternal(withKeyspace("INSERT INTO
> %s.single_static (pk0, ck0, s1, v0) VALUES (true, 'G', -114, true) USING
> TIMESTAMP 3"));
> cluster.get(3).executeInternal(withKeyspace("INSERT INTO
> %s.single_static (pk0, ck0) VALUES (true, 'F') USING TIMESTAMP 4"));
> cluster.get(1).executeInternal(withKeyspace("INSERT INTO
> %s.single_static (pk0, ck0, s1, v0) VALUES (true, 'C', 17, true) USING
> TIMESTAMP 5"));
> cluster.get(2).executeInternal(withKeyspace("UPDATE %s.single_static
> USING TIMESTAMP 6 SET s1 = 1, v0 = false WHERE pk0 = true AND ck0 = 'A'"));
> String selectPartition = withKeyspace("SELECT ck0 FROM
> %s.single_static WHERE pk0 = true");
> String select = withKeyspace("SELECT ck0 FROM %s.single_static WHERE
> s1 = 1 ALLOW FILTERING");
> SimpleQueryResult simplePartitionResult =
> cluster.coordinator(1).executeWithResult(selectPartition, ALL);
> SimpleQueryResult simpleResult =
> cluster.coordinator(1).executeWithResult(select, ALL);
> System.err.println("Non-paging partition result: " +
> simplePartitionResult);
> System.err.println("Non-paging filtering result: " + simpleResult);
> QueryResult partitionWithPagingResult =
> cluster.coordinator(1).executeWithPagingWithResult(selectPartition, ALL, 1);
> QueryResult saiWithPagingResult =
> cluster.coordinator(1).executeWithPagingWithResult(select, ALL, 1);
> System.err.println("Paging partition result: " +
> Iterators.toString(partitionWithPagingResult));
> System.err.println("Paging filtering result: " +
> Iterators.toString(saiWithPagingResult));
> assertEquals(4,
> Iterators.size(cluster.coordinator(1).executeWithPaging(selectPartition, ALL,
> 1)));
> assertRows(cluster.coordinator(1).executeWithPaging(select, ALL, 1),
> cluster.coordinator(1).executeWithPaging(selectPartition, ALL, 1));
> }
> Paging partition result: [Row{names=[ck0], results=[A]}, Row{names=[ck0],
> results=[C]}, Row{names=[ck0], results=[F]}, Row{names=[ck0], results=[G]}]
> Paging SAI result: [Row{names=[ck0], results=[A]}, Row{names=[ck0],
> results=[C]}, Row{names=[ck0], results=[G]}]
> java.lang.AssertionError: Expected: [F]
> Actual:[G]
> {noformat}
>
> The things that are worrisome here are the interaction of the static column,
> paging, and replica filtering protection. Disabling paging appears to pass
> the test, and either removing the first UPDATE or running the partition
> DELETE against node 3 also passes the test.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]