Sahina Bose has posted comments on this change.

Change subject: engine: Sync geo-rep config information
......................................................................


Patch Set 3:

(3 comments)

https://gerrit.ovirt.org/#/c/37109/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterGeoRepSyncJob.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterGeoRepSyncJob.java:

Line 202:         for (GlusterGeoRepSessionConfiguration sessionConfig : 
sessionConfigList) {
Line 203:             //update sessionId for fetched object.
Line 204:             sessionConfig.setId(session.getId());
Line 205:             // check if session config exists in db
Line 206:             if (!existingSessionConfigs.contains(sessionConfig)) {
> why do u need this out side if?. Can the check on map itself will suffice?
Outer check is to see If the retrieved config is same as the one in the DB. if 
so, no need to update/add
Line 207:                 if 
(existingKeyConfigMap.containsKey(sessionConfig.getKey())) {
Line 208:                     getGeoRepDao().updateConfig(sessionConfig);
Line 209:                     String oldValue = 
existingKeyConfigMap.get(sessionConfig.getKey()).getValue();
Line 210:                     
logGeoRepMessage(AuditLogType.GEOREP_OPTION_CHANGED_FROM_CLI,


https://gerrit.ovirt.org/#/c/37109/3/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterGeoRepSessionConfiguration.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterGeoRepSessionConfiguration.java:

Line 39:         this.allowedValues = allowedValues;
Line 40:     }
Line 41: 
Line 42:     @Override
Line 43:     public boolean equals(Object obj) {
> Why U don't want to consider id in equals and hashCode ?
Good point..I missed it with the refactoring
Line 44:         if (obj == null) {
Line 45:             return false;
Line 46:         }
Line 47:         return super.equals(obj);


https://gerrit.ovirt.org/#/c/37109/3/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterGeoRepDaoDbFacadeImpl.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterGeoRepDaoDbFacadeImpl.java:

Line 150:     }
Line 151: 
Line 152:     @Override
Line 153:     public GlusterGeoRepSessionConfiguration 
getGeoRepSessionConfigByKey(Guid sessionId, String configKey) {
Line 154:         // TODO Auto-generated method stub 
GetGlusterGeoRepSessionConfigByKey
> remove the TODO
Done
Line 155:         return 
getCallsHandler().executeRead("GetGlusterGeoRepSessionConfigByKey", 
georepSessionConfigRowMapper,
Line 156:                 
createIdParameterMapper(sessionId).addValue("config_key", configKey));
Line 157:     }
Line 158: 


-- 
To view, visit https://gerrit.ovirt.org/37109
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0ee0bc7e916df3becfc99b701de8a0c9e95e2a4d
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Ramesh N <rnach...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: anmolbabu <anb...@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