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

Jonathan Hsieh commented on HBASE-7848:
---------------------------------------

nit:  should probably return the value of super.prepare() in case the base 
class changes in the future somehow.

{code}
+  public EnabledTableSnapshotHandler prepare() throws Exception {
+    super.prepare();
+    this.tableLock.acquire(); //after this, you should ensure to release this 
lock in
+                              //case of exceptions
+    return this;
+  }
{code}

I'm thinking about why we only do this on the enabled table snapshot but not on 
the disabled table snapshot.  I think we would want to block the enables (or 
enables and then alters) from happening while a disabled table snapshot is 
happening.  

If we add to the disabled case, I think we are missing a call to prepare() 
here, and might want to move the prepare() implementation to 
TakeSnapshotHandler.java.

https://github.com/apache/hbase/blob/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java#L431

Thoughts?
                
> Use ZK-based read/write lock to make flush-type snapshot robust against table 
> enable/disable/alter
> --------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-7848
>                 URL: https://issues.apache.org/jira/browse/HBASE-7848
>             Project: HBase
>          Issue Type: Improvement
>          Components: snapshots
>    Affects Versions: 0.96.0
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>         Attachments: 7848-v1.txt, 7848-v2.txt, hbase-7848_v2.patch
>
>
> Current region split following flush would fail snapshot.
> We can utilize ZK-based read/write lock to make flush-type snapshot robust

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