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

ASF GitHub Bot commented on PHOENIX-3955:
-----------------------------------------

Github user ChinmaySKulkarni commented on the issue:

    https://github.com/apache/phoenix/pull/304
  
    Ran into [PHOENIX-3167](https://issues.apache.org/jira/browse/PHOENIX-3167) 
when doing some testing for this JIRA. 
    
    This can be a bigger problem now that we force an upgrade in case column 
families are out of sync for a table.
    
    Steps to repro:
    create table test (id INTEGER not null primary key, name varchar(10)) 
TTL=1200,KEEP_DELETED_CELLS='false',REPLICATION_SCOPE='1';
    alter table test add cf1.random varchar(10);
    -> New column family cf1 inherits TTL, KEEP_DELETED_CELLS and 
REPLICATION_SCOPE properties
    alter table test set TTL=100000;
    create table if not exists test (id INTEGER not null primary key, name 
varchar(10)) TTL=1200,KEEP_DELETED_CELLS='false',REPLICATION_SCOPE='1';
    -> Modifies HBase metadata for the table so TTL for default cf is changed 
to 1200, whereas newly added cf1's TTL is still 100000.
    
    With this patch, at this point, any future alter table command or create 
index will fail with UpgradeRequiredException since column family properties 
are out of sync.
    
    Even if we run the second create table with 'if not exists', same behavior.
    Similar problem is seen with alter table for global index. See 
[PHOENIX-4743](https://issues.apache.org/jira/browse/PHOENIX-4743)
    @twdsilva @vincentpoon 


> Ensure KEEP_DELETED_CELLS, REPLICATION_SCOPE, and TTL properties stay in sync 
> between the physical data table and index tables
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3955
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3955
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: Chinmay Kulkarni
>            Priority: Major
>
> We need to make sure that indexes inherit the REPLICATION_SCOPE, 
> KEEP_DELETED_CELLS and TTL properties from the base table. Otherwise we can 
> run into situations where the data was removed (or not removed) from the data 
> table but was removed (or not removed) from the index. Or vice-versa. We also 
> need to make sure that any ALTER TABLE SET TTL or ALTER TABLE SET 
> KEEP_DELETED_CELLS statements propagate the properties to the indexes too.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to