Allon Mureinik has posted comments on this change.

Change subject: engine: Introducing a queue for failovers event
......................................................................


Patch Set 5: Looks good to me, but someone else must approve

(4 inline comments)

minor inline comments

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/eventqueue/EventQueueMonitor.java
Line 33: @TransactionAttribute(TransactionAttributeType.SUPPORTS)
Line 34: @Local(EventQueue.class)
Line 35: public class EventQueueMonitor implements EventQueue {
Line 36: 
Line 37:     private static Log log = 
LogFactory.getLog(EventQueueMonitor.class);
should be final
Line 38: 
Line 39:     private static final ConcurrentMap<Guid, ReentrantLock> 
poolsLockMap = new ConcurrentHashMap<Guid, ReentrantLock>();
Line 40:     private static final Map<Guid, Queue<Pair<Event, 
FutureTask<EventResult>>>> poolsEventsMap =
Line 41:             new HashMap<Guid, Queue<Pair<Event, 
FutureTask<EventResult>>>>();


Line 70:             Event currentEvent = 
poolCurrentEventMap.get(storagePoolId);
Line 71:             if (currentEvent != null) {
Line 72:                 switch (currentEvent.getEventType()) {
Line 73:                 case RECONSTRUCT:
Line 74:                     log.debugFormat("Current event was skiped because 
of reconstruct is running now for pool {0}, event {1}",
s/skiped/skipped/ s/because of/because/
Line 75:                             storagePoolId, event);
Line 76:                     break;
Line 77:                 default:
Line 78:                     task = new FutureTask<EventResult>(callable);


Line 102:     }
Line 103: 
Line 104:     private ReentrantLock getPoolLock(Guid poolId) {
Line 105:         if (!poolsLockMap.containsKey(poolId)) {
Line 106:             poolsLockMap.putIfAbsent(poolId, new ReentrantLock());
If you're using puIfAbsent, why do you need the containsKey? optimization?
Line 107:         }
Line 108:         return poolsLockMap.get(poolId);
Line 109:     }
Line 110: 


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/eventqueue/EventType.java
Line 5:     DOMAINFAILOVER,
Line 6:     DOMAINNOTOPERATIONAL,
Line 7:     VDSSTOARGEPROBLEMS,
Line 8:     DOMAINMONITORING,
Line 9:     VDSCLEARCACHE;
please add "_" in between the words here. It's pretty unreadable.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1224feacdcdaaaf0b59d26105805ba7ef2a2fff
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: liron aravot <liron.ara...@gmail.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to