symious opened a new pull request, #3342:
URL: https://github.com/apache/ozone/pull/3342

   ## What changes were proposed in this pull request?
   
   In NodeImpl, the relation of ancestor is decided as follows:
   ```
   @Override
   public boolean isAncestor(Node node) {
     return this.getNetworkFullPath().equals(PATH_SEPARATOR_STR) ||
         node.getNetworkLocation().startsWith(this.getNetworkFullPath()) ||
         node.getNetworkFullPath().equalsIgnoreCase(this.getNetworkFullPath()); 
   ```
   The corner case is as follows:
   ```
   Node n1: "/rc"
   Node n2: "/rc1/dc/1.1.1.1"
   ```
   The result of n1.isAncestor(n2) is false, while in fact n1 is not n2's 
ancestor.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6640
   
   ## How was this patch tested?
   
   unit test
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to