hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-16490) Fix race condition between SnapshotManager and SnapshotCleaner
Date Fri, 26 Aug 2016 14:42:20 GMT

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

Ted Yu commented on HBASE-16490:
--------------------------------

Looks good overall.

For CleanerChore.java , the following import is not used:
{code}
+import org.apache.hadoop.hbase.master.HMaster;
{code}
{code}
-      return cache.getUnreferencedFiles(files);
+      return cache.getUnreferencedFiles(files, master.getSnapshotManager());
{code}
You don't need HMaster in order to access SnapshotManager. Take a look at MasterServices.java
:
{code}
  SnapshotManager getSnapshotManager();
{code}
{code}
+   *  key is snapshot's filename in progress, value is the relates lock
{code}
relates -> related


> Fix race condition between SnapshotManager and SnapshotCleaner
> --------------------------------------------------------------
>
>                 Key: HBASE-16490
>                 URL: https://issues.apache.org/jira/browse/HBASE-16490
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Heng Chen
>            Assignee: Heng Chen
>             Fix For: 2.0.0
>
>         Attachments: HBASE-16490.patch, HBASE-16490.v1.patch, HBASE-16490.v2.patch
>
>
> As [~mbertozzi] comments on HBASE-16464,  there maybe race condition between SnapshotManager
and SnapshotCleaner.  We should use one lock when create snapshot,  and cleanup should acquire
the lock before take action.
> One method is pass HMaster as param into Cleaner through {{FileCleanerDelegate.getDeletableFiles}},
 suggestions are welcomed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message