Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 34889F95E for ; Wed, 1 May 2013 23:00:17 +0000 (UTC) Received: (qmail 11982 invoked by uid 500); 1 May 2013 23:00:16 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 11932 invoked by uid 500); 1 May 2013 23:00:16 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 11922 invoked by uid 99); 1 May 2013 23:00:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 23:00:16 +0000 Date: Wed, 1 May 2013 23:00:16 +0000 (UTC) From: "Matteo Bertozzi (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-8465) Auto-drop rollback snapshot for snapshot restore MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-8465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13647035#comment-13647035 ] Matteo Bertozzi commented on HBASE-8465: ---------------------------------------- {quote}With this option we dropRollback but matteo's suggestion was to not even take the rollback snapshot in the firstplace.{quote} I tought you were against this one... and I guess Ted read it in my same way {quote}public void restoreSnapshot(final byte[] snapshotName, final boolean takeSnapshot){quote} wait... instead of doing this at this point we should use "String failsafeSnapshotName" and have the default one in the default method... {code} restore(tableName) { if (conf.restore.failsafe.snapshot == true) restore(tableName, "snapshot-for-rollback-name"); else restore(tableName, null); } restore(tableName, failsafeSnapshotName) { if (failsafeSnapshotName != null) takeSnapshot(failsafeSnapshotName); restore() ... } {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