Yiqun Lin commented on HDFS-13811:

Thanks for updating the patch, [~LiJinglun]. The change almost looks good to 
me. Some minor comments:
 * Can you update the javadoc of quota service class?
 * Service to periodically update the {@link RouterQuotaUsage}
 * cached information in the {@link Router} and update corresponding
 * mount table in State Store.
public class RouterQuotaUpdateService extends PeriodicService {

 * I don't think we need to change following places since the mount table entry 
queried from state store should already get the quota usage now.
-    updatedMountTable = getMountTable(path);
-    quota = updatedMountTable.getQuota();
-    assertEquals(2, mountQuota1.getFileAndDirectoryCount());
+    assertEquals(0, mountQuota1.getFileAndDirectoryCount());

 * Can you look into failed unit test? It's related.

> RBF: Race condition between router admin quota update and periodic quota 
> update service
> ---------------------------------------------------------------------------------------
>                 Key: HDFS-13811
>                 URL: https://issues.apache.org/jira/browse/HDFS-13811
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Dibyendu Karmakar
>            Assignee: Jinglun
>            Priority: Major
>         Attachments: HDFS-13811-000.patch, HDFS-13811-HDFS-13891-000.patch, 
> HDFS-13811.001.patch, HDFS-13811.002.patch, HDFS-13811.003.patch, 
> HDFS-13811.004.patch, HDFS-13811.005.patch
> If we try to update quota of an existing mount entry and at the same time 
> periodic quota update service is running on the same mount entry, it is 
> leading the mount table to _inconsistent state._
> Here transactions are:
> A - Quota update service is fetching mount table entries.
> B - Quota update service is updating the mount table with current usage.
> A' - User is trying to update quota using admin cmd.
> and the transaction sequence is [ A A' B ]
> quota update service is updating the mount table with old quota value.

This message was sent by Atlassian Jira

To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to