Alon Bar-Lev has posted comments on this change.

Change subject: aaa: Fix sync
......................................................................


Patch Set 1:

(1 comment)

Hi,

Cannot say I understand the code... but please confirm:

1. you fetch all users with non recursive, update the users entries in 
database, during this sequence you store the groups within cache.

2. you fetch all groups ids from database that do not exist in the cache and 
query these with no groups, so we complete the cache.

3. you go over group cache and resolve groups, each group that is resolved is 
marked.

4. you keep doing (3) for these that are not marked, you can use two maps or 
something as well.

anyway... if I think of it... we have a problem... as provide should tell the 
sync logic if to do recursive or not, as return 1st level of user and/or 1st 
level of group may be recursive anyway, so we do not need to ask... we may need 
to add capabilities flags to context if that sounds logical.

http://gerrit.ovirt.org/#/c/28561/1/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 136:         }
Line 137:         for (String namespace : idsPerNamespace.keySet()) {
Line 138:             List<DirectoryUser> directoryUsers = null;
Line 139:             if (authz != null) {
Line 140:                 directoryUsers = 
AuthzUtils.findPrincipalsByIds(authz, namespace, 
idsPerNamespace.get(namespace), true, false);
so now queries are always non recursive, so you can drop the last parameter, 
right?
Line 141:             }
Line 142:             else {
Line 143:                 directoryUsers = Collections.emptyList();
Line 144:             }


-- 
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: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to