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

NITIN VERMA commented on HBASE-17460:
-------------------------------------

CC: [~onpduo]  [~gouravk] [~devaraj] for review.

Thanks [~ashish singhi]  for the comment!

I had thought about that scenario, but I don't see any other scenario where we 
compare the table descriptors at column families than replicaiton. 
I think this function is only used for replication (correct me if I am wrong).
Even for other scenario's, I think it will be better to ignore the 
REPLICATION_SCOPE. 
For example: If you have two tables 'T1' and 'T2' on the same cluster with 
exact same properties, but T1 has replication and T2 doesn't, then we should 
still the comparison should return true. 

> enable_table_replication can not perform cyclic replication of a table
> ----------------------------------------------------------------------
>
>                 Key: HBASE-17460
>                 URL: https://issues.apache.org/jira/browse/HBASE-17460
>             Project: HBase
>          Issue Type: Bug
>          Components: Replication
>            Reporter: NITIN VERMA
>              Labels: replication
>         Attachments: HBASE-17460.patch
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> The enable_table_replication operation is broken for cyclic replication of 
> HBase table as we compare all the properties of column families (including 
> REPLICATION_SCOPE). 
> Below is exactly what happens:
> 1.  Running "enable_table_replication 'table1'  " opeartion on first cluster 
> will set the REPLICATION_SCOPE of all column families to peer id '1'. This 
> will also create a table on second cluster where REPLICATION_SCOPE is still 
> set to peer id '0'.
> 2. Now when we run "enable_table_replication 'table1'" on second cluster, we 
> compare all the properties of table (including REPLICATION_SCOPE_, which 
> obviously is different now. 
> I am proposing a fix for this issue where we should avoid comparing 
> REPLICATION_SCOPE inside HColumnDescriotor::compareTo() method, especially 
> when replication is not already enabled on the desired table.
> I have made that change and it is working. I will submit the patch soon.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to