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

Ryan McGuire updated CASSANDRA-7193:
------------------------------------

    Description: 
I can create a table with the new query cache from CASSANDRA-5357:

{code}
CREATE TABLE status (user text, status_id timeuuid, status text, PRIMARY KEY 
(user, status_id)) WITH caching = '{"keys":"ALL", "rows_per_partition":"10"}';
{code}

This method appears to work fine.

However, that is not the syntax mentioned in that ticket. It says to use a 
rows_per_partition_to_cache setting instead, which does appear to work in cql:

{code}
CREATE TABLE status2 (user text, status_id timeuuid, status text, PRIMARY KEY 
(user, status_id)) WITH rows_per_partition_to_cache = 200;
{code}

But that setting is not reflected in the table description, instead it still 
shows NONE:

{code}
cqlsh:test> DESCRIBE TABLE status2;

CREATE TABLE test.status2 (
    user text,
    status_id timeuuid,
    status text,
    PRIMARY KEY (user, status_id)
) WITH CLUSTERING ORDER BY (status_id ASC)
    AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
    ...
{code}

Similarly, alter table with that syntax, does not produce an error, but also 
does not seem to affect the setting :

{code}
ALTER TABLE test.status WITH rows_per_partition_to_cache = 200;
{code}

  was:
I can create a table with the new query cache from CASSANDRA-5357:

{code}
CREATE TABLE status (user text, status_id timeuuid, status text, PRIMARY KEY 
(user, status_id)) WITH caching = '{"keys":"ALL", "rows_per_partition":"10"}';
{code}

This method appears to work fine.

However, that is not the syntax mentioned in that ticket. It says to use a 
rows_per_partition_to_cache setting instead, which does appear to work in cql:

{code}
CREATE TABLE status2 (user text, status_id timeuuid, status text, PRIMARY KEY 
(user, status_id)) WITH rows_per_partition_to_cache = 200;
{code}

But that setting is not reflected in the table description:

{code}
cqlsh:test> DESCRIBE TABLE status2;

CREATE TABLE test.status2 (
    user text,
    status_id timeuuid,
    status text,
    PRIMARY KEY (user, status_id)
) WITH CLUSTERING ORDER BY (status_id ASC)
    AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
    ...
{code}

Similarly, alter table with that syntax, does not produce an error, but also 
does not seem to affect the setting :

{code}
ALTER TABLE test.status WITH rows_per_partition_to_cache = 200;
{code}


> rows_per_partition_to_cache is not reflected in table DESCRIBE
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-7193
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7193
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Ryan McGuire
>            Assignee: Marcus Eriksson
>            Priority: Minor
>
> I can create a table with the new query cache from CASSANDRA-5357:
> {code}
> CREATE TABLE status (user text, status_id timeuuid, status text, PRIMARY KEY 
> (user, status_id)) WITH caching = '{"keys":"ALL", "rows_per_partition":"10"}';
> {code}
> This method appears to work fine.
> However, that is not the syntax mentioned in that ticket. It says to use a 
> rows_per_partition_to_cache setting instead, which does appear to work in cql:
> {code}
> CREATE TABLE status2 (user text, status_id timeuuid, status text, PRIMARY KEY 
> (user, status_id)) WITH rows_per_partition_to_cache = 200;
> {code}
> But that setting is not reflected in the table description, instead it still 
> shows NONE:
> {code}
> cqlsh:test> DESCRIBE TABLE status2;
> CREATE TABLE test.status2 (
>     user text,
>     status_id timeuuid,
>     status text,
>     PRIMARY KEY (user, status_id)
> ) WITH CLUSTERING ORDER BY (status_id ASC)
>     AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
>     ...
> {code}
> Similarly, alter table with that syntax, does not produce an error, but also 
> does not seem to affect the setting :
> {code}
> ALTER TABLE test.status WITH rows_per_partition_to_cache = 200;
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to