Alon Bar-Lev has posted comments on this change. Change subject: aaa: Fix sync ......................................................................
Patch Set 10: (2 comments) http://gerrit.ovirt.org/#/c/28561/10/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DbUserCacheManager.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DbUserCacheManager.java: Line 156: } else { Line 157: for (DirectoryGroup directoryGroup : fetchedGroups) { Line 158: cache.put(directoryGroup.getId(), directoryGroup); Line 159: } Line 160: } > not sure i understood. as I do not understand the comment and I do not understand the code... I try to explain again what I expect. fetch all users from database arrange the users based on namespace for each namespace fetch users if not recursive provider add group ids to to_fetch else add groups to cache fetch all groups from database add all groups into to_fetch while to_fetch is not empty for each namespace fetch all to_fetch belongs to namespace for each group put group in cache put subgroups in to_fetch what do I miss? Line 161: Line 162: // Repeat the same for groups from db. Line 163: if (dbGroups.get(namespace) != null) { Line 164: List<DirectoryGroup> directoryGroups = new ArrayList<>(dbGroups.get(namespace).size()); Line 233: } Line 234: } Line 235: } Line 236: Line 237: private Collection<DirectoryGroup> flatGroupsIfRecursive(boolean toFlat, List<DirectoryGroup> groups) { > I can of course. do u think i should do it? if it removes logic/complexity, why not? Line 238: Collection<DirectoryGroup> results = groups; Line 239: if (toFlat) { Line 240: Set<DirectoryGroup> accumulator = new HashSet<>(); Line 241: DirectoryUtils.flatGroups(accumulator, groups); -- To view, visit http://gerrit.ovirt.org/28561 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id49b51517a967c7a83e8e73f52181673baa31700 Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
