[ https://issues.apache.org/jira/browse/RANGER-5245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18008649#comment-18008649 ]
Vyom Mani Tiwari commented on RANGER-5245: ------------------------------------------ Given the logic of the {{dedupTags}} method, where it always replaces the higher tag ID with the lower one if it exists in {{{}cachedTags{}}}, it's unlikely to enter a situation where there's a cycle in {{{}replacedIds{}}}. The logic ensures that the {{replacedIds}} map will always point to a lower tag ID, which reduces the possibility of cycles. Since the replacement is always directed towards the lower ID, it's more like a directed acyclic graph (DAG) where each node (tag ID) points to a lower node. Given this logic, it's reasonable to conclude that cycles in {{replacedIds}} are unlikely to occur. The method's design seems to prevent cycles by always favoring the lower tag ID. > Investigate the potential loop in dedupTags method > --------------------------------------------------- > > Key: RANGER-5245 > URL: https://issues.apache.org/jira/browse/RANGER-5245 > Project: Ranger > Issue Type: Bug > Components: Ranger > Affects Versions: 2.6.0 > Reporter: Vyom Mani Tiwari > Assignee: Vyom Mani Tiwari > Priority: Major > > for (Long replacerTagId = replacedIds.get(tagId); replacerTagId != null; > replacerTagId = replacedIds.get(mappedTagId)) { > mappedTagId = replacerTagId; > } > Investigate if it possible for dedupTags to enter infinite loop. -- This message was sent by Atlassian Jira (v8.20.10#820010)