Sahina Bose has posted comments on this change. Change subject: engine: Geo-rep monitoring ......................................................................
Patch Set 6: (2 comments) http://gerrit.ovirt.org/#/c/31976/6/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 100: session.setStatus(GeoRepSessionStatus.FAULTY); Line 101: continue; Line 102: } Line 103: // if not active or faulty - has to be in one of Initialising, Stopped, Not Started Line 104: GeoRepSessionStatus nodeStatus = (GeoRepSessionStatus) nodeStatusMap.values().toArray()[0]; > Cant we use GeoRepSessionStatus.<Something> instead ?? I'm not sure I follow..I'm getting the existing status from the list, making sure all in the list is same status and updating the session object. Line 105: if (CollectionUtils.countMatches(nodeStatusMap.values(), PredicateUtils.equalPredicate(nodeStatus)) == nodeStatusMap.size() && Line 106: GeoRepSessionStatus.ACTIVE.equals(session.getStatus())) { Line 107: session.setStatus(nodeStatus); Line 108: } http://gerrit.ovirt.org/#/c/31976/6/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterGeoRepDao.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterGeoRepDao.java: Line 16: public void save(GlusterGeoRepSession geoRepSession); Line 17: Line 18: public void saveDetails(GlusterGeoRepSessionDetails geoRepSessionDetails); Line 19: Line 20: public void saveDetailsInBatch(List<GlusterGeoRepSessionDetails> geoRepSessionDetailsObjs); > Do we really need to suffix "Objs" ? Cant we say geoRepSessiondetailsList ? Can do. Line 21: Line 22: public void saveConfig(GlusterGeoRepSessionConfiguration geoRepSessionConfig); Line 23: Line 24: /** -- To view, visit http://gerrit.ovirt.org/31976 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3304addda17cf49eee93f311e043b0e15212cd91 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sahina Bose <[email protected]> Gerrit-Reviewer: Kanagaraj M <[email protected]> Gerrit-Reviewer: Ramesh N <[email protected]> Gerrit-Reviewer: Sahina Bose <[email protected]> Gerrit-Reviewer: Shubhendu Tripathi <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
