[ https://issues.apache.org/jira/browse/HDFS-13811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16694887#comment-16694887 ]
Yiqun Lin edited comment on HDFS-13811 at 11/21/18 4:08 PM: ------------------------------------------------------------ Take a quick look for the patch, looks like we change a lot. Thinking again for the corner case mentioned, can we use a more easier way: 1) When prepare to update mount tables in RouterQuotaUpdateService#updateMountTableEntries, get the latest mount table entries in quota update service. 2) When latest quota value is not matched with fetched before, then generate a new quota value(use latest quota and latest quota usage). I mean we can just take an additional check when updating the quota usage in update service. At least one thing we should promise: admin cmd be respected and making sense.. If this way is okay, I'm not sure other change is really needed. Please let me know your thought, [~dibyendu_hadoop]. I think this way can address your case. was (Author: linyiqun): Take a quick look for the patch, looks like we change a lot. Thinking again for the corner case mentioned, can we use a more easier way: 1) When prepare to update mount tables in RouterQuotaUpdateService#updateMountTableEntries, get the latest mount table entries in quota update service. 2) When latest quota value is not matched with fetched before, then generate a new quota value. I mean we can just take an additional check when updating the quota usage in update service. At least one thing we should promise: admin cmd be respected and making sense.. If this way is okay, I'm not sure other change is really needed. Please let me know your thought, [~dibyendu_hadoop]. I think this way can address your case. > 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: Dibyendu Karmakar > Priority: Major > Attachments: HDFS-13811-000.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 (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org