----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/75232/#review226978 -----------------------------------------------------------
Fix it, then Ship it! Added a minor comment to the test code. It looks good overall. However, it is not clear how and where the dedupTags() is called multiple times during the initialization of the plugin as described in the original description of the JIRA. agents-common/src/test/java/org/apache/ranger/plugin/util/TestServiceTags.java Lines 85 (patched) <https://reviews.apache.org/r/75232/#comment315263> Consider adding assertEquals(0, svcTags.dedupTags()); after this line and after line 97. - Abhay Kulkarni On Oct. 17, 2024, 1:29 a.m., Madhan Neethiraj wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/75232/ > ----------------------------------------------------------- > > (Updated Oct. 17, 2024, 1:29 a.m.) > > > Review request for ranger, Abhishek Kumar, Anand Nadar, Asit Vadhavkar, > Fateh Singh, Abhay Kulkarni, Pradeep Agrawal, Radhika Kundam, Ramesh Mani, > and Sailaja Polavarapu. > > > Bugs: RANGER-4956 > https://issues.apache.org/jira/browse/RANGER-4956 > > > Repository: ranger > > > Description > ------- > > - dedupTags() on a ServiceTag instance can result in infinite loop when its > cachedTags is already populated (by an earlier call or via a copy > constructor), as it tries to replace a tag with itself. Updated to avoid such > replacement. > > > Diffs > ----- > > agents-common/src/main/java/org/apache/ranger/plugin/util/ServiceTags.java > cc2ebe53a > > agents-common/src/test/java/org/apache/ranger/plugin/util/TestServiceTags.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/75232/diff/1/ > > > Testing > ------- > > - added unit tests to verify dedupTags() > - verified that all unit tests pass > > > Thanks, > > Madhan Neethiraj > >