You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (Jira)" <ji...@apache.org> on 2021/06/03 16:14:00 UTC

[jira] [Comment Edited] (CASSANDRA-16686) Queries returning static content when the partition has no rows might fail to return some rows

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

Benjamin Lerer edited comment on CASSANDRA-16686 at 6/3/21, 4:13 PM:
---------------------------------------------------------------------

| [PR|https://github.com/apache/cassandra/pull/1031] | [j8|https://app.circleci.com/pipelines/github/blerer/cassandra/129/workflows/519bc951-fac9-4950-87fc-7e3b0725414f] | [j11|https://app.circleci.com/pipelines/github/blerer/cassandra/129/workflows/906c3374-d8b5-4164-a42e-3981b801bbc3] |
The patch fix the issue by adding all the static columns to the fetched columns when the query is at the partition level (without clustering or regular column restrictions). I took the opportunity to simplify the {{ColumnFilter}} logic that was starting to become really confusing.

 As 4.0-rc1 has been released we need to ensure backward compatibility with it in a mixed cluster environment. To ensure that some extra changes were required in {{ColumnFilter}} and in {{Gossiper}}.


was (Author: blerer):
| [PR|https://github.com/apache/cassandra/pull/1031] | [j8|https://app.circleci.com/pipelines/github/blerer/cassandra/126/workflows/1921f1e1-f7e6-45e1-8e20-7ea231180bdb] | [j11|https://app.circleci.com/pipelines/github/blerer/cassandra/126/workflows/8f975dea-638d-476b-baee-780274fb60c3] |
The patch fix the issue by adding all the static columns to the fetched columns when the query is at the partition level (without clustering or regular column restrictions). I took the opportunity to simplify the {{ColumnFilter}} logic that was starting to become really confusing.

 As 4.0-rc1 has been released we need to ensure backward compatibility with it in a mixed cluster environment. To ensure that some extra changes were required in {{ColumnFilter}} and in {{Gossiper}}.

> Queries returning static content when the partition has no rows might fail to return some rows
> ----------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-16686
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16686
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Interpreter
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>            Priority: Normal
>             Fix For: 4.0-rc
>
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> The problem can be reproduced with the following test:
> {code}
>     @Test
>     public void testStaticColumnDeletionWithMultipleStaticColumns() throws Throwable
>     {
>         createTable("CREATE TABLE %s (pk int, ck int, s1 int static, s2 int static, v int, PRIMARY KEY(pk, ck))");
>         execute("INSERT INTO %s (pk, s1, s2) VALUES (1, 1, 1) USING TIMESTAMP 1000");
>         flush();
>         execute("INSERT INTO %s (pk, s1) VALUES (1, 2) USING TIMESTAMP 2000");
>         flush();
>         execute("DELETE s1 FROM %s USING TIMESTAMP 3000 WHERE pk = 1");
>         flush();
>         assertRows(execute("SELECT * FROM %s WHERE pk=1"), row(1, null, null, 1, null));
>         assertRows(execute("SELECT s1, s2 FROM %s WHERE pk=1"), row((Integer) null, 1));
>         assertRows(execute("SELECT s1 FROM %s WHERE pk=1"), row((Integer) null)); // <-FAIL
>     }
> {code}
> This problem is a regression in 4.0 and trunk



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org