Alon Bar-Lev has posted comments on this change.

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


Patch Set 6:

(2 comments)

http://gerrit.ovirt.org/#/c/28561/6/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 169:                     }
Line 170:                 }
Line 171:             }
Line 172: 
Line 173:             Map<String, DirectoryGroup> cache = new HashMap<>();
> ok, can you think of some concrete example that will make me understand? :)
user1 -> group1, group2

database -> group1, group2

if you do first groups then you fetch:

 1. group1
 2. group2
 3. user1

if you do user first you fetch:

 1. user1
Line 174:             populateRecrusiveGroups(authz, cache, toFetch);
Line 175: 
Line 176: 
Line 177: 


Line 170:                 }
Line 171:             }
Line 172: 
Line 173:             Map<String, DirectoryGroup> cache = new HashMap<>();
Line 174:             populateRecrusiveGroups(authz, cache, toFetch);
> i thought about it as well, and for some reason i got convinced we don't ne
no... your algorithm should not be recursive at all this is where you are 
confused.

your algorithm should be lazy resolver, until nothing to be resolved.

even if you think there is recursive, you do not apply recursion anywhere... 
but when you flat groups which is invalid as you do not get recursive anyway... 
this is why your condition is the exact opposite BTW.
Line 175: 
Line 176: 
Line 177: 
Line 178:             for (DirectoryUser directoryUser : directoryUsers) {


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

Reply via email to