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

Jonathan Hsieh commented on HBASE-8465:
---------------------------------------

+1 for the runtime/xml conf behavior Matteo sketched.

On take snapshot vs drop rollback.  let's look at the use cases:
# table ok, use restore to get old data back.  Does it make sense to snapshot 
on restore?  Yes. 
# table ok, use restore to get old data back but it fails... (leads to next 
case)
# table broken, use restore to fix.   Does snapshotting on the next restore 
attempt make sense? (hm.. not really)
# table broken, using restore to get valid data back but it fails...  (go back 
to previous case).

As initially envisioned, the snapshot on restore wasn't for a fixup case, but 
for retaining "healthy" modifications before the restore.  In the cases of 
broken tables, cases 3,4 wants the ability to skip taking the snapshot.  I'd 
argue that case 1 is the common case -- and that case 3 and 4 are arguments for 
having an option for not snapshotting on restore. 

Dropping the rollback snapshot seems a little gratuitous -- we have the ability 
to do this with existing commands don't we?
                
> Auto-drop rollback snapshot for snapshot restore
> ------------------------------------------------
>
>                 Key: HBASE-8465
>                 URL: https://issues.apache.org/jira/browse/HBASE-8465
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>
> Below is an excerpt from snapshot restore javadoc:
> {code}
>    * Restore the specified snapshot on the original table. (The table must be 
> disabled)
>    * Before restoring the table, a new snapshot with the current table state 
> is created.
>    * In case of failure, the table will be rolled back to the its original 
> state.
> {code}
> We can improve the handling of rollbackSnapshot in two ways:
> 1. give better name to the rollbackSnapshot (adding 
> {code}'-for-rollback-'{code}). Currently the name is of the form:
>     String rollbackSnapshot = snapshotName + "-" + 
> EnvironmentEdgeManager.currentTimeMillis();
> 2. drop rollbackSnapshot at the end of restoreSnapshot() if the restore is 
> successful. We can introduce new config param, named 
> 'hbase.snapshot.restore.drop.rollback', to keep compatibility with current 
> behavior.

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