[jira] [Updated] (HDFS-14761) RBF: MountTableResolver cannot invalidate cache correctly

2019-08-23 Thread Jira


 [ 
https://issues.apache.org/jira/browse/HDFS-14761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Íñigo Goiri updated HDFS-14761:
---
Fix Version/s: 3.3.0
 Hadoop Flags: Reviewed
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

> RBF: MountTableResolver cannot invalidate cache correctly
> -
>
> Key: HDFS-14761
> URL: https://issues.apache.org/jira/browse/HDFS-14761
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: rbf
>Reporter: Yuxuan Wang
>Assignee: Yuxuan Wang
>Priority: Major
>  Labels: RBF
> Fix For: 3.3.0
>
> Attachments: draft-reproduce-patch-HDFS-14761.patch
>
>
> STEPS TO REPRODUCE:
> add mount table entry 1->/
> mountTable.getDestinationForPath("/foo/a") will return "1->/foo/a", that's 
> correct
> add mount table entry 2->/foo
> mountTable.getDestinationForPath("/foo/a") should return "2->/foo/a", but it 
> still return "1->/foo/a"
> WHY:
> {code:title=MountTableResolver.java|borderStyle=solid}
> private void invalidateLocationCache(...)
> {
> ...
> String src = loc.getSourcePath();
> if (src != null) {
> if (isParentEntry(src, path)) {
>   LOG.debug("Removing {}", src);
>   it.remove();
> }
> }
> ...
> }
> {code}
> *path* is the new entry, in our case is "/foo"
> But *src* is the mount point path, in our case is "/", which isn't child of 
> "/foo"
> So, it can't invalidate the cache entry.
> HOW TO FIX:
> Just reverse the parameters of *isParentEntry* .
> PS:
> *PathLocation#getSourcePath()* will return *PathLocation#sourcePath*, which 
> attached a comment about "Source path in global namespace.". But I think the 
> field indeed denotes the mount point path after I review the code. I think 
> it's confused.



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



[jira] [Updated] (HDFS-14761) RBF: MountTableResolver cannot invalidate cache correctly

2019-08-23 Thread Yuxuan Wang (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-14761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuxuan Wang updated HDFS-14761:
---
Status: Patch Available  (was: In Progress)

> RBF: MountTableResolver cannot invalidate cache correctly
> -
>
> Key: HDFS-14761
> URL: https://issues.apache.org/jira/browse/HDFS-14761
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: rbf
>Reporter: Yuxuan Wang
>Assignee: Yuxuan Wang
>Priority: Major
>  Labels: RBF
> Attachments: draft-reproduce-patch-HDFS-14761.patch
>
>
> STEPS TO REPRODUCE:
> add mount table entry 1->/
> mountTable.getDestinationForPath("/foo/a") will return "1->/foo/a", that's 
> correct
> add mount table entry 2->/foo
> mountTable.getDestinationForPath("/foo/a") should return "2->/foo/a", but it 
> still return "1->/foo/a"
> WHY:
> {code:title=MountTableResolver.java|borderStyle=solid}
> private void invalidateLocationCache(...)
> {
> ...
> String src = loc.getSourcePath();
> if (src != null) {
> if (isParentEntry(src, path)) {
>   LOG.debug("Removing {}", src);
>   it.remove();
> }
> }
> ...
> }
> {code}
> *path* is the new entry, in our case is "/foo"
> But *src* is the mount point path, in our case is "/", which isn't child of 
> "/foo"
> So, it can't invalidate the cache entry.
> HOW TO FIX:
> Just reverse the parameters of *isParentEntry* .
> PS:
> *PathLocation#getSourcePath()* will return *PathLocation#sourcePath*, which 
> attached a comment about "Source path in global namespace.". But I think the 
> field indeed denotes the mount point path after I review the code. I think 
> it's confused.



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



[jira] [Updated] (HDFS-14761) RBF: MountTableResolver cannot invalidate cache correctly

2019-08-20 Thread Yuxuan Wang (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-14761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuxuan Wang updated HDFS-14761:
---
Description: 
STEPS TO REPRODUCE:
add mount table entry 1->/
mountTable.getDestinationForPath("/foo/a") will return "1->/foo/a", that's 
correct
add mount table entry 2->/foo
mountTable.getDestinationForPath("/foo/a") should return "2->/foo/a", but it 
still return "1->/foo/a"
WHY:
{code:title=MountTableResolver.java|borderStyle=solid}
private void invalidateLocationCache(...)
{
...
String src = loc.getSourcePath();
if (src != null) {
if (isParentEntry(src, path)) {
  LOG.debug("Removing {}", src);
  it.remove();
}
}
...
}
{code}
*path* is the new entry, in our case is "/foo"
But *src* is the mount point path, in our case is "/", which isn't child of 
"/foo"
So, it can't invalidate the cache entry.
HOW TO FIX:
Just reverse the parameters of *isParentEntry* .
PS:
*PathLocation#getSourcePath()* will return *PathLocation#sourcePath*, which 
attached a comment about "Source path in global namespace.". But I think the 
field indeed denotes the mount point path after I review the code. I think it's 
confused.

  was:
STEPS TO REPRODUCE:
add mount table entry 1->/
mountTable.getDestinationForPath("/foo/a") will return "1->/foo/a", that's 
correct
add mount table entry 2->/foo
mountTable.getDestinationForPath("/foo/a") should return "2->/foo/a", but it 
still return "1->/foo/a"
WHY:
{code:title=MountTableResolver.java|borderStyle=solid}
private void invalidateLocationCache(...)
{
...
String src = loc.getSourcePath();
if (src != null) {
if (isParentEntry(src, path)) {
  LOG.debug("Removing {}", src);
  it.remove();
}
}
...
}
{code}
*path* is the new entry, in our case is "/foo"
But src is the mount point path, in our case is "/", which isn't child of "/foo"
So, it can't invalidate the cache entry.
HOW TO FIX:
Just reverse the parameters of *isParentEntry* .
PS:
*PathLocation#getSourcePath()* will return *PathLocation#sourcePath*, which 
attached a comment about "Source path in global namespace.". But I think the 
field indeed denotes the mount point path after I review the code. I think it's 
confused.


> RBF: MountTableResolver cannot invalidate cache correctly
> -
>
> Key: HDFS-14761
> URL: https://issues.apache.org/jira/browse/HDFS-14761
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: rbf
>Reporter: Yuxuan Wang
>Assignee: Yuxuan Wang
>Priority: Major
>  Labels: RBF
> Attachments: draft-reproduce-patch-HDFS-14761.patch
>
>
> STEPS TO REPRODUCE:
> add mount table entry 1->/
> mountTable.getDestinationForPath("/foo/a") will return "1->/foo/a", that's 
> correct
> add mount table entry 2->/foo
> mountTable.getDestinationForPath("/foo/a") should return "2->/foo/a", but it 
> still return "1->/foo/a"
> WHY:
> {code:title=MountTableResolver.java|borderStyle=solid}
> private void invalidateLocationCache(...)
> {
> ...
> String src = loc.getSourcePath();
> if (src != null) {
> if (isParentEntry(src, path)) {
>   LOG.debug("Removing {}", src);
>   it.remove();
> }
> }
> ...
> }
> {code}
> *path* is the new entry, in our case is "/foo"
> But *src* is the mount point path, in our case is "/", which isn't child of 
> "/foo"
> So, it can't invalidate the cache entry.
> HOW TO FIX:
> Just reverse the parameters of *isParentEntry* .
> PS:
> *PathLocation#getSourcePath()* will return *PathLocation#sourcePath*, which 
> attached a comment about "Source path in global namespace.". But I think the 
> field indeed denotes the mount point path after I review the code. I think 
> it's confused.



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



[jira] [Updated] (HDFS-14761) RBF: MountTableResolver cannot invalidate cache correctly

2019-08-20 Thread Yuxuan Wang (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-14761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuxuan Wang updated HDFS-14761:
---
Attachment: draft-reproduce-patch-HDFS-14761.patch

> RBF: MountTableResolver cannot invalidate cache correctly
> -
>
> Key: HDFS-14761
> URL: https://issues.apache.org/jira/browse/HDFS-14761
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: rbf
>Reporter: Yuxuan Wang
>Priority: Major
>  Labels: RBF
> Attachments: draft-reproduce-patch-HDFS-14761.patch
>
>
> STEPS TO REPRODUCE:
> add mount table entry 1->/
> mountTable.getDestinationForPath("/foo/a") will return "1->/foo/a", that's 
> correct
> add mount table entry 2->/foo
> mountTable.getDestinationForPath("/foo/a") should return "2->/foo/a", but it 
> still return "1->/foo/a"
> WHY:
> {code:title=MountTableResolver.java|borderStyle=solid}
> private void invalidateLocationCache(...)
> {
> ...
> String src = loc.getSourcePath();
> if (src != null) {
> if (isParentEntry(src, path)) {
>   LOG.debug("Removing {}", src);
>   it.remove();
> }
> }
> ...
> }
> {code}
> *path* is the new entry, in our case is "/foo"
> But src is the mount point path, in our case is "/", which isn't child of 
> "/foo"
> So, it can't invalidate the cache entry.
> HOW TO FIX:
> Just reverse the parameters of *isParentEntry* .
> PS:
> *PathLocation#getSourcePath()* will return *PathLocation#sourcePath*, which 
> attached a comment about "Source path in global namespace.". But I think the 
> field indeed denotes the mount point path after I review the code. I think 
> it's confused.



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