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

Jing Zhao commented on HDFS-6315:
---------------------------------

The patch looks good to me in general. Some comments:
# After moving persistBlocks/persistNewBlocks/closeFile from FSDirectory to 
FSNamesystem, we may no longer need to add "DIR* FSDirectory" into the log 
information.
# Looks like FSNamesystem#persistBlocks(INodeFile, boolean) can be removed. We 
can just call persistBlocks(String, INodeFile, boolean) instead.
# In FSNamesystem#setQuota logSync cannot be called inside of the write lock:
{code}
+      INodeDirectory changed = dir.setQuota(path, nsQuota, dsQuota);
+      if (changed != null) {
+        final Quota.Counts q = changed.getQuotaCounts();
+        getEditLog().logSetQuota(path,
+                q.get(Quota.NAMESPACE), q.get(Quota.DISKSPACE));
+        getEditLog().logSync();
+      }
     } finally {
       writeUnlock();
     }
-    getEditLog().logSync();
{code}
# A typo in the java comment:
{code}
-          // if src indicates a snapshot file, we need to make sure the 
returned
+          // if src inSicates a snapshot file, we need to make sure the 
returned
{code}

> Decouple recording edit logs from FSDirectory
> ---------------------------------------------
>
>                 Key: HDFS-6315
>                 URL: https://issues.apache.org/jira/browse/HDFS-6315
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-6315.000.patch, HDFS-6315.001.patch, 
> HDFS-6315.002.patch, HDFS-6315.003.patch, HDFS-6315.004.patch
>
>
> Currently both FSNamesystem and FSDirectory record edit logs. This design 
> requires both FSNamesystem and FSDirectory to be tightly coupled together to 
> implement a durable namespace.
> This jira proposes to separate the responsibility of implementing the 
> namespace and providing durability with edit logs. Specifically, FSDirectory 
> implements the namespace (which should have no edit log operations), and 
> FSNamesystem implement durability by recording the edit logs.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to