[
https://issues.apache.org/jira/browse/HDFS-13811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16972023#comment-16972023
]
Jinglun commented on HDFS-13811:
--------------------------------
Now we have quota & quota usage saved in 3 places: state store, mount table
store and RouterQuotaManager. And the periodic service updates all the 3 places
when the quota usage changes. The idea is only the router admin should be able
to update the state store. Periodic service should only update the quota usage
in local cache, which is the RouterQuotaManager.
Based on the idea, only the quota part in the state store and the mount table
store are meaningful(the usage part are meaningless). The quota usage would be
saved and updated only by the RouterQuotaManager. In the periodic service we
should update RouterQuotaManager's quota from mount table store and update
RouterQuotaManager's quota usage by counting the real paths. The patch could be
much simpler, upload v01.
> 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
>
>
> 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
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]