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

Dave Brosius commented on CASSANDRA-4963:
-----------------------------------------

{quote}Indeed why would setting a new value with a ttl in the map set the whole 
map ttl?{quote}

because the user sees only one column and thus sees it as modifying the 
collection column and really doesn't even know that values have their own 
column. 

again tho, the bigger problem i see with it, is that you are destroying the 
integrity of the users data. It is exactly the same as saying, when i tombstone 
a string column, i'm just going change the value to "dead". Users can then see 
that and know what happened.

this will potentially present a set that is illegal from an application data 
model point of view. I may have a set column where i know the valid legal 
states are <empty> A, AB, or ABC. But tombstoning could return a value of AC, 
which is not a valid state for my collection column.

                
> A cql collection 'column' doesn't own it's ttl
> ----------------------------------------------
>
>                 Key: CASSANDRA-4963
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4963
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0 beta 2
>            Reporter: Dave Brosius
>            Priority: Minor
>
> if you add a collection column with a ttl, then later update the collection 
> by adding a new element, the 'under the covers' column representing the added 
> value has no ttl. It seems like ttl tombstoning should only be allowed to 
> remove the collection in entirety, or not touch it, but not be allowed to 
> modify it by removing parts.
> example
> cqlsh> create keyspace collections with replication = 
> {'class':'SimpleStrategy', 'replication_factor':1};
> cqlsh> use collections;
> cqlsh:collections> create table collections (key int primary key, aset 
> set<text>);
> cqlsh:collections> insert into collections (key, aset) values (1, {'fee', 
> 'fi'}) using ttl 10000;
> cqlsh:collections> update collections set aset = aset + {'fo', 'fum'} where 
> key = 1;
> cqlsh:collections> exit
> cassandra-cli
> [default@unknown] use collections
> [default@collections] get collections[1];
> => (column=, value=, timestamp=1352874321877000)
> => (column=aset:666565, value=, timestamp=1352874314717000, ttl=10000)
> => (column=aset:6669, value=, timestamp=1352874314717000, ttl=10000)
> => (column=aset:666f, value=, timestamp=1352874321877000)
> => (column=aset:66756d, value=, timestamp=1352874321877000)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to