cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ZhaoYang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-13883) StrictLiveness for view row is not handled in AbstractRow
Date Wed, 20 Sep 2017 01:54:00 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-13883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

ZhaoYang updated CASSANDRA-13883:
---------------------------------
    Fix Version/s: 4.0
                   3.11.1
                   3.0.15
           Status: Patch Available  (was: In Progress)

> StrictLiveness for view row is not handled in AbstractRow
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-13883
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13883
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Materialized Views
>            Reporter: ZhaoYang
>            Assignee: ZhaoYang
>             Fix For: 3.0.15, 3.11.1, 4.0
>
>
> In {{AbstractRow.hasLiveData(nowInSecond)}}, it doesn't handle {{strictLiveness}} introduced
in CASSANDRA-11500. The {{DataLimits}} counts the expired view row as live data and then the
expired view row is purged in {{Row.purge()}}. When query with limit, we will get less data.
> {code:title=test to reproduce}
>     @Test
>     public void testRegularColumnTimestampUpdates() throws Throwable
>     {
>         createTable("CREATE TABLE %s (" +
>                     "k int PRIMARY KEY, " +
>                     "c int, " +
>                     "val int)");
>         execute("USE " + keyspace());
>         executeNet(protocolVersion, "USE " + keyspace());
>         createView("mv_rctstest", "CREATE MATERIALIZED VIEW %s AS SELECT * FROM %%s WHERE
k IS NOT NULL AND c IS NOT NULL PRIMARY KEY (k,c)");
>         updateView("UPDATE %s SET c = ?, val = ? WHERE k = ?", 0, 0, 0);
>         updateView("UPDATE %s SET val = ? WHERE k = ?", 1, 0);
>         updateView("UPDATE %s SET c = ? WHERE k = ?", 1, 0);
>         assertRows(execute("SELECT c, k, val FROM mv_rctstest"), row(1, 0, 1));
>         updateView("TRUNCATE %s");
>         updateView("UPDATE %s USING TIMESTAMP 1 SET c = ?, val = ? WHERE k = ?", 0, 0,
0);
>         updateView("UPDATE %s USING TIMESTAMP 3 SET c = ? WHERE k = ?", 1, 0);
>         updateView("UPDATE %s USING TIMESTAMP 2 SET val = ? WHERE k = ?", 1, 0);
>         updateView("UPDATE %s USING TIMESTAMP 4 SET c = ? WHERE k = ?", 2, 0);
>         updateView("UPDATE %s USING TIMESTAMP 3 SET val = ? WHERE k = ?", 2, 0);
>         // FIXME no rows return
>         assertRows(execute("SELECT c, k, val FROM mv_rctstest limit 1"), row(2, 0, 2));
>         assertRows(execute("SELECT c, k, val FROM mv_rctstest"), row(2, 0, 2));
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message