[ 
https://issues.apache.org/jira/browse/CASSANDRA-16567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17321032#comment-17321032
 ] 

Andres de la Peña commented on CASSANDRA-16567:
-----------------------------------------------

I think that the failure happens because the truncation of a table doesn't stop 
the asynchronous builders of its materialized views. As a result, it's possible 
that, after truncating a table, still running MV builders insert pre-truncate 
rows into the MV. The proposed PR simply makes sure to stop any ongoing MV 
builds when a table is truncated, [this 
way|https://github.com/apache/cassandra/pull/967/commits/3e3a6fd699c819c3642a810074f5fcbe174cda64].
 Also, the PR adds [a simple 
test|https://github.com/apache/cassandra/pull/967/commits/c5eea8d0311c9aba8e223072cd600a87c86dec6d]
 reproducing the problematic scenario more consistently than 
{{testCompoundPartitionKey}}.

Also, although it's not related to the failure, I've noticed that {{ViewTest}} 
still uses {{ProtocolVersion.V4}} instead of the current one. I think this is 
not intentional so I've also 
[changed|https://github.com/apache/cassandra/pull/967/commits/f30007a990b16e5f9c1c151051c1a21ccb689030]
 the test to use {{CQLTester.getDefaultVersion}} instead.

CI runs:
 * [CircleCI 
j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/269/workflows/9e5b7540-b8aa-4ecb-97e7-476f88c01a59]
 * [CircleCI 
j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/269/workflows/50b4e9c0-151e-42fe-84a3-7953030637b2]
 * 
[Jenkins|https://ci-cassandra.apache.org/blue/organizations/jenkins/Cassandra-devbranch/detail/Cassandra-devbranch/653/pipeline]
 * [Internal 
multiplexer|https://jenkins-dse.build.dsinternal.org/view/Parameterized/job/parameterized-testall/788/]

> Fix test testCompoundPartitionKey - org.apache.cassandra.cql3.ViewTest
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-16567
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16567
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CI, Test/unit
>            Reporter: David Capwell
>            Assignee: Andres de la Peña
>            Priority: Normal
>             Fix For: 4.0-rc
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://app.circleci.com/pipelines/github/dcapwell/cassandra/874/workflows/0b0a1e36-107a-43c7-815f-bf8e61d3028d/jobs/5227/tests
> {code}
> junit.framework.AssertionFailedError: Got more rows than expected. Expected 0 
> but got 1.
>       at org.apache.cassandra.cql3.CQLTester.assertRows(CQLTester.java:1185)
>       at 
> org.apache.cassandra.cql3.ViewTest.testCompoundPartitionKey(ViewTest.java:817)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to