Michael Kublin has uploaded a new change for review.

Change subject: engine: Fixing possible ConcurrentModificationException at 
EventQueueMonitor
......................................................................

engine: Fixing possible ConcurrentModificationException at EventQueueMonitor

The following exception can ocurred during change of shared data for different 
pools.
Fixing it

Change-Id: I5898a7783ae8246de982c2c74b43352887026886
Signed-off-by: Michael Kublin <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/eventqueue/EventQueueMonitor.java
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/11870/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/eventqueue/EventQueueMonitor.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/eventqueue/EventQueueMonitor.java
index 19565c7..718d891 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/eventqueue/EventQueueMonitor.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/eventqueue/EventQueueMonitor.java
@@ -1,6 +1,5 @@
 package org.ovirt.engine.core.bll.eventqueue;
 
-import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
 import java.util.concurrent.Callable;
@@ -37,8 +36,8 @@
 
     private static final ConcurrentMap<Guid, ReentrantLock> poolsLockMap = new 
ConcurrentHashMap<Guid, ReentrantLock>();
     private static final Map<Guid, LinkedList<Pair<Event, 
FutureTask<EventResult>>>> poolsEventsMap =
-            new HashMap<Guid, LinkedList<Pair<Event, 
FutureTask<EventResult>>>>();
-    private static final Map<Guid, Event> poolCurrentEventMap = new 
HashMap<Guid, Event>();
+            new ConcurrentHashMap<Guid, LinkedList<Pair<Event, 
FutureTask<EventResult>>>>();
+    private static final Map<Guid, Event> poolCurrentEventMap = new 
ConcurrentHashMap<Guid, Event>();
 
     @Override
     public void submitEventAsync(Event event, Callable<EventResult> callable) {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5898a7783ae8246de982c2c74b43352887026886
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to