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

Jerry He commented on HBASE-8760:
---------------------------------

Hi, Matteo

I've just tested the v4 patch again 0.94 and 0.95.2. These are the basic steps:
1. Change the code to disable compaction (similar to what you mentioned).
2. start hbase
3. Create and populate a TestTable with 'hbase 
org.apache.hadoop.hbase.PerformanceEvaluation  randomWrite 5'
4. split TestTable
5. snapshot 'TestTable', 'my_snapshot1'  (This snapshot includes parent and 
daughter references.)
6. stop hbase
7. Change the code to enable normal compaction.
8. start hbase
9. Wait for normal compactions (and/or additional splits) to go thru their 
courses, and hfile cleaners to go thru their courses as well.
10. clone_snapshot 'my_snapshot1', 'TestTable_clone'
11. count the rows of TestTable_clone to verify the number is the same as 
TestTable.
12. Verify there are no exceptions in region server logs like 'can not open 
link' or 'can not open file'.

13. snapshot 'TestTable_clone', 'my_snapshot2'
14. clone 'my_snapshot2', 'TestTable_clone_clone'

                
> possible loss of data in snapshot taken after region split
> ----------------------------------------------------------
>
>                 Key: HBASE-8760
>                 URL: https://issues.apache.org/jira/browse/HBASE-8760
>             Project: HBase
>          Issue Type: Bug
>          Components: snapshots
>    Affects Versions: 0.94.8, 0.95.1
>            Reporter: Jerry He
>             Fix For: 0.98.0, 0.95.2, 0.94.12
>
>         Attachments: HBase-8760-0.94.8.patch, HBase-8760-0.94.8-v1.patch, 
> HBASE-8760-0.94-v4.patch, HBASE-8760-thz-v0.patch, HBASE-8760-thz-v1.patch, 
> HBASE-8760-thz-v2.patch, HBASE-8760-thz-v3.patch, HBASE-8760-v4.patch
>
>
> Right after a region split but before the daughter regions are compacted, we 
> have two daughter regions containing Reference files to the parent hfiles.
> If we take snapshot right at the moment, the snapshot will succeed, but it 
> will only contain the daughter Reference files. Since there is no hold on the 
> parent hfiles, they will be deleted by the HFile Cleaner after they are no 
> longer needed by the daughter regions soon after.
> A minimum we need to do is the keep these parent hfiles from being deleted. 

--
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