You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "spolavarpau1 (via GitHub)" <gi...@apache.org> on 2026/09/28 19:47:02 UTC

Re: [PR] RANGER-5110: Update the FQDN of users and groups whenever it changes [ranger]

spolavarpau1 commented on code in PR #516:
URL: https://github.com/apache/ranger/pull/516#discussion_r4126289359


##########
ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java:
##########
@@ -294,6 +294,13 @@ public void addOrUpdateUsersGroups(Map<String, Map<String, String>> sourceGroups
         if (!isStartupFlag && computeDeletes) {
             LOG.info("Computing deleted users/groups");
 
+            userCache.clear();

Review Comment:
   Clearing cache and rebuilding the cache from Ranger Admin is a considerable performance overhead. 



##########
ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java:
##########
@@ -747,16 +752,6 @@ private void computeGroupDelta(Map<String, Map<String, String>> sourceGroups) {
                     noOfModifiedGroups++;
                     groupNameMap.put(groupDN, groupName);
                 } else {
-                    if (MapUtils.isNotEmpty(curGroupAttrs) && !StringUtils.equalsIgnoreCase(groupDN, curGroupDN)) { // skip update

Review Comment:
   This will introduce regressions and change in behavior for existing customers when they upgrade. Instead, please take a look at the below PR where a new flag is introduced for updating DN of the user/group
   https://github.com/apache/ranger/pull/1162



-- 
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: dev-unsubscribe@ranger.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org