> On March 24, 2014, 9:56 p.m., Alena Prokharchyk wrote: > > DomainRouterDaoImpl.java > > > > Why do you iterate through VRs set twice? That doesn't seem right to me. > > Why don't you just return original routerIds set? > > > > > > public List<DomainRouterVO> listByRunningStateAndManagementServer(State > > state, long mgmtSrvrId) { > > 308 > > SearchCriteria<DomainRouterVO> sc = > > RunningSearchByManagementServerId.create(); > > 309 > > sc.setParameters("state", State.Running); > > 310 > > sc.setJoinParameters("host", "mgmtServerId", mgmtSrvrId); > > 311 > > List<DomainRouterVO> routerIds = listBy(sc); > > 312 > > List<DomainRouterVO> routers = new ArrayList<DomainRouterVO>(); > > 313 > > for (DomainRouterVO router : routerIds) { > > 314 > > routers.add(findById(router.getId())); > > 315 > > } > > 316 > > return routers; > > 317 > > } > > Harikrishna Patnala wrote: > This I have put it to remove the duplicates in case of VPC routers. But > I'll remove this loop because anyway I'm skipping the VPC routers in the loop > in VritualnetworkapplianceManagerImpl
Huh? That doesn't make any sense to me. listBy(sc) returns you non-duplicated entries. So yes, please go ahead and remove it. - Alena ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19578/#review38374 ----------------------------------------------------------- On March 25, 2014, 6:24 a.m., Harikrishna Patnala wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19578/ > ----------------------------------------------------------- > > (Updated March 25, 2014, 6:24 a.m.) > > > Review request for cloudstack, Jayapal Reddy, Murali Reddy, and Sheng Yang. > > > Bugs: CLOUDSTACK-6253 > https://issues.apache.org/jira/browse/CLOUDSTACK-6253 > > > Repository: cloudstack-git > > > Description > ------- > > CLOUDSTACK-6253: Optimizing VR alerts getting algorithm > In addition to this a new configuration parameter is added > router.alerts.check.interval defaulted to 30minutes to check for alerts in > Virtual Router > > > Diffs > ----- > > core/src/com/cloud/agent/api/GetRouterAlertsAnswer.java 06a7a7a > > core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java > e13fbf6 > engine/schema/src/com/cloud/vm/dao/DomainRouterDao.java e3f75fa > engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java 6b62f56 > server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java > e3597ac > server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java > c692491 > systemvm/patches/debian/config/opt/cloud/bin/getRouterAlerts.sh e5e8abe > test/integration/component/test_VirtualRouter_alerts.py PRE-CREATION > test/integration/smoke/test_VirtualRouter_alerts.py 2333d84 > > Diff: https://reviews.apache.org/r/19578/diff/ > > > Testing > ------- > > > Thanks, > > Harikrishna Patnala > >