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

Ayush Saxena commented on HDFS-14833:
-------------------------------------

Thanx [~elgoiri] for the review.
bq.  Should we originally set entry to request.getEntry() and then change it if 
MountTableResolver?
I don't think this shall work, because we are concluding by comparing, if we do 
so, we will land up comparing the same entries. In the method we are passing 
the update request and the old entry. if we change from old entry to request 
entry. The check will not work since the entries to be compared shall be same.

Well I know these many if checks are confusing to decode, It took me hours to 
understand( not sure whether I understood correctly). I started considering to 
put just a location check, but while writing UT, realized these issues, That 
sync itself is not working now.

I would try explaining all changes, correct me if wrong :

* *Extracting mount entry first* : In the present logic, we used to execute 
update command and then go for checking if quota is changed, the comparison was 
done between updateRequest entry and mountTable entry(after it being updated). 
So the value use to remain same, Thus checks considering no update. So as to 
overcome this, I pulled up the getting the mountTable entry logic before 
calling update so that comparison can be done between old entries and new one.
* *Adding Location Check* : Earlier only change in quota use to trigger quota 
sync, but if the locations are changed, this is to trigger sync on the new 
locations too. Say a entry /mnt was pointing to /dst with quota 10 if we change 
dest to /dst1, /dst1 should also be set with quota 10. In such case since 
update entry quota and existing entry quota shall stay same, so added this 
check.
* *Load cache in synchronize quota* : While testing realized that when we go 
for synchronizing quota, if the cache is not loaded it shoots request on old 
path, To make sure it triggers on the new locations added this.

Let me know, If missed something. :)


> RBF: Router Update Doesn't Sync Quota
> -------------------------------------
>
>                 Key: HDFS-14833
>                 URL: https://issues.apache.org/jira/browse/HDFS-14833
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>         Attachments: HDFS-14833-01.patch, HDFS-14833-02.patch
>
>
> HDFS-14777 Added a check to prevent RPC call, It checks whether in the 
> present state whether quota is changing. 
> But ignores the part that if the locations are changed. if the location is 
> changed the new destination should be synchronized with the mount entry 
> quota. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
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