[
https://issues.apache.org/jira/browse/HDDS-6640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sammi Chen updated HDDS-6640:
-----------------------------
Fix Version/s: 1.3.0
> Node.isAncestor might return incorrect result
> ---------------------------------------------
>
> Key: HDDS-6640
> URL: https://issues.apache.org/jira/browse/HDDS-6640
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Janus Chow
> Assignee: Janus Chow
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.3.0
>
>
> In NodeImpl, the relation of ancestor is decided as follows:
> {code:java}
> @Override
> public boolean isAncestor(Node node) {
> return this.getNetworkFullPath().equals(PATH_SEPARATOR_STR) ||
> node.getNetworkLocation().startsWith(this.getNetworkFullPath()) ||
> node.getNetworkFullPath().equalsIgnoreCase(this.getNetworkFullPath());
> {code}
> The corner case is as follows:
> {code:java}
> Node n1: "/rc"
> Node n2: "/rc1/dc/1.1.1.1"{code}
> The result of n1.isAncestor(n2) is false, while in fact n1 is not n2's
> ancestor.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]