Michael Kublin has posted comments on this change.
Change subject: core: Treat "only in db" zombie tasks
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskManager.java
Line 90: }
Line 91:
Line 92: @OnTimerMethodAnnotation("_timer_Elapsed")
Line 93: public synchronized void _timer_Elapsed() {
Line 94: long timeForZombieTasks = DateTime.getNow()
Please use System.currenttimeInMillis() ...
Line 95: .AddMinutes((-1) * Config.<Integer>
GetValue(ConfigValues.AsyncTaskZombieTaskLifeInMinutes)).getTime();
Line 96:
Line 97: if (ThereAreTasksToPoll()) {
Line 98: PollAndUpdateAsyncTasks();
Line 214: while (tasksInDbIterator.hasNext()) {
Line 215: AsyncTasks task = tasksInDbIterator.next();
Line 216: if (!_tasks.containsKey(task.gettask_id())) {
Line 217: if (task.getStartTime().getTime() <
timeForZombieTasks) {
Line 218: tasksInDbIterator.remove();
I don't like method of iterator.remoe() for case of ArrayList it will cause to
system copy of whole array with out removed element
Line 219:
DbFacade.getInstance().getAsyncTaskDao().remove(task.gettask_id());
Line 220: }
Line 221: }
Line 222: }
--
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: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches