Yair Zaslavsky has posted comments on this change.

Change subject: core: Clean "only in db" async tasks
......................................................................


Patch Set 6: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskManager.java
Line 83:                 Config.<Integer> 
GetValue(ConfigValues.AsyncTaskStatusCacheRefreshRateInSeconds), 
TimeUnit.SECONDS);
Line 84:         _cacheTimeInMinutes = Config.<Integer> 
GetValue(ConfigValues.AsyncTaskStatusCachingTimeInMinutes);
Line 85:         tasksInDbAfterRestart = new ConcurrentHashMap<Guid, 
List<AsyncTasks>>();
Line 86:         for (AsyncTasks task: 
DbFacade.getInstance().getAsyncTaskDao().getAll()) {
Line 87:             List<AsyncTasks> tasksPerStoragePool = 
tasksInDbAfterRestart.get(task.getStoragePoolId());
Note to reviewers -
I guess the "if" part can be replaced with putIfAbscent - at first I did not 
use ConcurrentMap but a Map.
Please comment on this as well.
Line 88:             if (tasksPerStoragePool == null) {
Line 89:                 tasksPerStoragePool = new ArrayList<AsyncTasks>();
Line 90:                 tasksInDbAfterRestart.put(task.getStoragePoolId(), 
tasksPerStoragePool);
Line 91:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie13ae21eaadb1bb621a7fc8ad471e60387a3699b
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to