[
https://issues.apache.org/jira/browse/HBASE-8465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13647024#comment-13647024
]
Jonathan Hsieh commented on HBASE-8465:
---------------------------------------
bq. The name of rollback snapshot is not returned. Person issuing restore
command may not be aware of the existence of rollback snapshot. Later, when
list_snapshots command reveals the rollback snapshots, people are surprised. I
think dropping the rollback snapshot is desirable.
I think we should have the user specify the snapshot taken on restore. (and
deprecate the autonaming if that is confusing).
In v2 I don't see the change from dropRollback wording to snapshotOnRestore
wording in the code. With this option we dropRollback but matteo's suggestion
was to not even take the rollback snapshot in the firstplace.
Following through would mean converting this
{code}
+ private static final String
RESTORE_DROP_ROLLBACK_SNAPSHOT="hbase.snapshot.restore.drop.rollback";
{code}
to something like {{... TAKE_SNAPSHOT_ON_RESTORE =
"hbase.snapshot.restore.takesnapshot"}}
An example would be (default would be after the change would be true instead of
false):
{code}
- public void restoreSnapshot(final byte[] snapshotName, final boolean
dropRollbackSnapshot
+ public void restoreSnapshot(final byte[] snapshotName, final boolean
takeSnapshot)
{code}
> 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
> Fix For: 0.98.0, 0.95.1
>
> Attachments: 8465-trunk-v1.txt, 8465-trunk-v2.txt
>
>
> 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