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

Vincent Poon commented on PHOENIX-4530:
---------------------------------------

[~jamestaylor] v2 patch attached:
 * I moved the logic back to UngroupedAggregateRegionObserver to make it so it 
works for compaction of either the data table or index tables
 * PartialIndexRebuilderIT#testCompactionDuringRebuild() is no longer valid, 
since it tests for disabling of the index and we no longer do that, so I 
removed it
 * HBase uses the HStore directly to do its compaction testing - I even call a 
method called compactRecentForTesting().  I did see Phoenix's 
TestUtil.doMajorCompaction(), but it's pretty crude - it does an async request 
through the HBaseAdmin, then polls the table to check the status.  Furthermore, 
the logic in there doesn't work for our use case, because it does a Put then a 
Delete, then compacts and polls to see if the cells were removed.  In our case, 
we're not deleting the cells, so the test will never pass and you get an 
infinite loop.
 * Added a TestUtil.getRawRowCount()

> Do not collect delete markers during major compaction of table with disabled 
> mutable indexes
> --------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-4530
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4530
>             Project: Phoenix
>          Issue Type: Improvement
>         Environment:  
>            Reporter: James Taylor
>            Assignee: Vincent Poon
>            Priority: Major
>         Attachments: PHOENIX-4530.master.v1.patch, 
> PHOENIX-4530.master.v2.patch
>
>
> If major compaction occurs on a table with mutable indexes that have the 
> INDEX_DISABLE_TIMESTAMP set, we currently permanently disable the index, 
> forcing it to be manually rebuilt from scratch. This is to prevent it from 
> potentially being corrupted as we need the delete markers to remain in order 
> to guarantee the data table and index table remain in sync.
> An alternate approach (mentioned by [~an...@apache.org] during review) is to 
> detect this case in a pre-compaction hook and set the compaction up so that 
> delete markers are not removed. This would have the advantage that we 
> wouldn't have to permanently disable the index and rebuild it from scratch.



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

Reply via email to