[
https://issues.apache.org/jira/browse/CASSANDRA-19007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17944785#comment-17944785
]
David Capwell commented on CASSANDRA-19007:
-------------------------------------------
to document things here and not just in slack between Caleb and I
SAI now fixes this problem, so the AST Harry tests are stable with multiple
node, so if you want to hit this ticket on ALLOW FILTERING the following patch
would make it very likely (rather than statistically unlikely)
{code}
diff --git
a/test/distributed/org/apache/cassandra/distributed/test/cql3/SingleNodeTableWalkTest.java
b/test/distributed/org/apache/cassandra/distributed/test/cql3/SingleNodeTableWalkTest.java
index 924bd3eeeb..99548cea82 100644
---
a/test/distributed/org/apache/cassandra/distributed/test/cql3/SingleNodeTableWalkTest.java
+++
b/test/distributed/org/apache/cassandra/distributed/test/cql3/SingleNodeTableWalkTest.java
@@ -123,7 +123,8 @@ public class SingleNodeTableWalkTest extends StatefulASTBase
protected List<CreateIndexDDL.Indexer> supportedIndexers()
{
// since legacy is async it's not clear how the test can wait for the
background write to complete...
- return Collections.singletonList(CreateIndexDDL.SAI);
+// return Collections.singletonList(CreateIndexDDL.SAI);
+ return Collections.emptyList();
}
public Property.Command<State, Void, ?> selectExisting(RandomSource rs,
State state)
@@ -585,7 +586,8 @@ public class SingleNodeTableWalkTest extends StatefulASTBase
private boolean
hasMultiNodeMultiColumnAllowFilteringWithLocalWritesIssue()
{
- return isMultiNode() &&
IGNORED_ISSUES.contains(KnownIssue.AF_MULTI_NODE_MULTI_COLUMN_AND_NODE_LOCAL_WRITES);
+// return isMultiNode() &&
IGNORED_ISSUES.contains(KnownIssue.AF_MULTI_NODE_MULTI_COLUMN_AND_NODE_LOCAL_WRITES);
+ return false;
}
public boolean allowPartitionQuery()
{code}
We maintain a KnownIssue enum and use this to work around tickets before those
issues get fixed, so need to disable the work arounds to allow ALLOW FILTERING
on multi node clusters. With that done you want to hit this faster, so you can
disable SAI (tests have a 50% chance to do this per example)
> Queries with multi-column replica-side filtering can miss rows
> --------------------------------------------------------------
>
> Key: CASSANDRA-19007
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19007
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Consistency/Coordination
> Reporter: Andres de la Peña
> Assignee: Caleb Rackliffe
> Priority: Normal
> Fix For: 5.x
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{SELECT}} queries with multi-column replica-side filtering can miss rows if
> the filtered columns are spread across out-of-sync replicas. This dtest
> reproduces the issue:
> {code:java}
> @Test
> public void testMultiColumnReplicaSideFiltering() throws IOException
> {
> try (Cluster cluster = init(Cluster.build().withNodes(2).start()))
> {
> cluster.schemaChange(withKeyspace("CREATE TABLE %s.t (k int PRIMARY
> KEY, a int, b int)"));
> // insert a split row
> cluster.get(1).executeInternal(withKeyspace("INSERT INTO %s.t(k, a)
> VALUES (0, 1)"));
> cluster.get(2).executeInternal(withKeyspace("INSERT INTO %s.t(k, b)
> VALUES (0, 2)"));
> String select = withKeyspace("SELECT * FROM %s.t WHERE a = 1 AND b =
> 2 ALLOW FILTERING");
> Object[][] initialRows = cluster.coordinator(1).execute(select, ALL);
> assertRows(initialRows, row(0, 1, 2)); // not found!!
> }
> }
> {code}
> This edge case affects queries using {{ALLOW FILTERING}} or any index
> implementation.
> It affects all branches since multi-column replica-side filtering queries
> were introduced, long before 3.0.
> The protection mechanism added by CASSANDRA-8272/8273 won't deal with this
> case, since it only solves single-column conflicts where stale rows could
> resurrect. This bug however doesn't resurrect data, it can only miss rows
> while the replicas are out-of-sync.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]