Alon Bar-Lev has posted comments on this change.

Change subject: core : Introduce engine_sessions table and DAO
......................................................................


Patch Set 1:

(7 comments)

just few comments about the structure... cannot really review dao...

http://gerrit.ovirt.org/#/c/35148/1/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EngineSessionDAO.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EngineSessionDAO.java:

Line 22:      * Retrieves all sessions.
Line 23:      *
Line 24:      * @return the list of sessions
Line 25:      */
Line 26:     List<EngineSession> getAll();
best not to get all but iterate or get based on condition, such as expired...
Line 27: 
Line 28:     /**
Line 29:      * Saves or updates the specified session
Line 30:      *


http://gerrit.ovirt.org/#/c/35148/1/packaging/dbscripts/engine_sessions_sp.sql
File packaging/dbscripts/engine_sessions_sp.sql:

Line 1: ----------------------------------------------------------------
Line 2: -- [engine_sessions] Table
Line 3: --
Line 4: Create or replace FUNCTION InsertEngineSession(v_id VARCHAR(255),
Line 5:         v_user_id UUID,
tab
Line 6:         v_user_name VARCHAR(255),
Line 7:         v_auth_record VARCHAR(255),
Line 8:         v_principal_record VARCHAR(255),
Line 9:         v_group_ids VARCHAR(2048),


Line 3: --
Line 4: Create or replace FUNCTION InsertEngineSession(v_id VARCHAR(255),
Line 5:         v_user_id UUID,
Line 6:         v_user_name VARCHAR(255),
Line 7:         v_auth_record VARCHAR(255),
should allow very large records, what have you had in mind? convert to json? 
base64?
Line 8:         v_principal_record VARCHAR(255),
Line 9:         v_group_ids VARCHAR(2048),
Line 10:         v_role VARCHAR(255),
Line 11:         v_session_expiration timestamp WITH TIME ZONE)


Line 4: Create or replace FUNCTION InsertEngineSession(v_id VARCHAR(255),
Line 5:         v_user_id UUID,
Line 6:         v_user_name VARCHAR(255),
Line 7:         v_auth_record VARCHAR(255),
Line 8:         v_principal_record VARCHAR(255),
should allow very large records
Line 9:         v_group_ids VARCHAR(2048),
Line 10:         v_role VARCHAR(255),
Line 11:         v_session_expiration timestamp WITH TIME ZONE)
Line 12: RETURNS VOID


Line 5:         v_user_id UUID,
Line 6:         v_user_name VARCHAR(255),
Line 7:         v_auth_record VARCHAR(255),
Line 8:         v_principal_record VARCHAR(255),
Line 9:         v_group_ids VARCHAR(2048),
can we have a table for group ids? or due to mla nature we should keep this in 
single field?
Line 10:         v_role VARCHAR(255),
Line 11:         v_session_expiration timestamp WITH TIME ZONE)
Line 12: RETURNS VOID
Line 13:    AS $procedure$


Line 6:         v_user_name VARCHAR(255),
Line 7:         v_auth_record VARCHAR(255),
Line 8:         v_principal_record VARCHAR(255),
Line 9:         v_group_ids VARCHAR(2048),
Line 10:         v_role VARCHAR(255),
also... can be several roles... should/can we do this in a different table?
Line 11:         v_session_expiration timestamp WITH TIME ZONE)
Line 12: RETURNS VOID
Line 13:    AS $procedure$
Line 14: BEGIN


Line 7:         v_auth_record VARCHAR(255),
Line 8:         v_principal_record VARCHAR(255),
Line 9:         v_group_ids VARCHAR(2048),
Line 10:         v_role VARCHAR(255),
Line 11:         v_session_expiration timestamp WITH TIME ZONE)
why with zone? utc should be enough... also should be able to be null to enable 
session without expiration.
Line 12: RETURNS VOID
Line 13:    AS $procedure$
Line 14: BEGIN
Line 15: INSERT INTO engine_sessions(id, user_id, user_name, auth_record, 
principal_record, group_ids, role, session_expiration)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4b4d9cfc3edc6084fc0436ecfd09c82d5ae57f5e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to