Alon Bar-Lev has posted comments on this change.

Change subject: aaa: Added usage of AuthRecord.VALID_TO
......................................................................


Patch Set 8:

(2 comments)

http://gerrit.ovirt.org/#/c/26975/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/session/SessionDataContainer.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/session/SessionDataContainer.java:

Line 158:      */
Line 159:     @OnTimerMethodAnnotation("cleanExpiredUsersSessions")
Line 160:     public final void cleanExpiredUsersSessions() {
Line 161:         Long key = new Date().getTime() / 60000;
Line 162:         List<String> sessionsList = validToSessionsMap.get(key);
this is not that great, as if your clock is out of sync / jumps / process 
suspended you will have leftovers

you must clean up all <= x
Line 163:         if (sessionsList != null) {
Line 164:             for (String session : sessionsList) {
Line 165:                 removeSession(session);
Line 166:             }


Line 167:             validToSessionsMap.remove(key);
Line 168:         }
Line 169:         if (intervalsCounter.incrementAndGet() == Config.<Integer> 
getValue(ConfigValues.UserSessionTimeOutInterval)) {
Line 170:             deleteOldGeneration();
Line 171:             intervalsCounter.set(0);
I do not understand why you need two methods of cleanup sessions, while the 
validTo should be sufficient.
Line 172:         }
Line 173: 
Line 174:     }
Line 175: 


-- 
To view, visit http://gerrit.ovirt.org/26975
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I53e4a371c1bae8d2480ddd2af921a560c6fe9a85
Gerrit-PatchSet: 8
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