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

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

You raised a good simple alternative approach, which is to fail the snapshot in 
this particular case :-)

On the master TakeSnapshotHandler(), we set excludeOfflinedSplitParents to true 
in here:
{code}
      List<Pair<HRegionInfo, ServerName>> regionsAndLocations =
          
MetaReader.getTableRegionsAndLocations(this.server.getCatalogTracker(),
            Bytes.toBytes(snapshot.getTable()), true);
{code}

On the region server side, each RS only add online regions to snapshot:
{code}
  private List<HRegion> getRegionsToSnapshot(SnapshotDescription snapshot) 
throws IOException {
    byte[] table = Bytes.toBytes(snapshot.getTable());
    return rss.getOnlineRegions(table);
  }
{code}

So we are missing out the parent hfiles.

Fail the snapshot thru verifier is an option.
It is just that snapshot can continue to succeed in this case.

Add FixReferences() step is an option as well.  This probably should be done on 
the master in the last stage of snapshot?
But do you deal with the parent hfiles as part of the parent region to include?

                
> 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
>            Reporter: Jerry He
>            Assignee: Jerry He
>             Fix For: 0.94.8
>
>         Attachments: HBase-8760-0.94.8.patch, HBase-8760-0.94.8-v1.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