Allon Mureinik has posted comments on this change.
Change subject: 15. core : Handle incomplete tasks on server restart
......................................................................
Patch Set 8: I would prefer that you didn't submit this
(4 inline comments)
Java comments inline.
Need to also think a bit about the behavior in general - will revisit this
patch later.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskFactory.java
Line 47: AsyncTaskParameters asyncTaskParams = new
AsyncTaskParameters(creationInfo, asyncTask);
Line 48: return Construct(creationInfo.getTaskType(), asyncTaskParams,
true);
Line 49: }
Line 50:
Line 51: public static SPMAsyncTask Construct(AsyncTaskCreationInfo
creationInfo, AsyncTasks asyncTask) {
I think it's about time to rename both Construct methods to construct...
Line 52: AsyncTaskParameters asyncTaskParams = new
AsyncTaskParameters(creationInfo, asyncTask);
Line 53: return Construct(creationInfo.getTaskType(), asyncTaskParams,
true);
Line 54: }
Line 55:
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskManager.java
Line 91:
Config.<Integer>GetValue(ConfigValues.AsyncTaskStatusCacheRefreshRateInSeconds),
TimeUnit.SECONDS);
Line 92: _cacheTimeInMinutes =
Config.<Integer>GetValue(ConfigValues.AsyncTaskStatusCachingTimeInMinutes);
Line 93: tasksInDbAfterRestart = new ConcurrentHashMap();
Line 94: Map<Guid, List<AsyncTasks>> rootCommandIdToTasksMap =
groupTasksByRootCommandId(DbFacade.getInstance().getAsyncTaskDao().getAll());
Line 95: for (Guid rootCommandId : rootCommandIdToTasksMap.keySet()) {
Iterate over the entrySet()
Line 96: if
(hasTasksWithoutVdsmId(rootCommandIdToTasksMap.get(rootCommandId))) {
Line 97: log.infoFormat("Root Command {0} has tasks without
vdsm id.", rootCommandId);
Line 98:
handleTasksOfCommandWithEmptyVdsmId(rootCommandIdToTasksMap.get(rootCommandId));
Line 99: }
Line 233: Guid rootCommandId = task.getRootCommandId();
Line 234: if
(!rootCommandIdToCommandsMap.containsKey(rootCommandId)) {
Line 235: rootCommandIdToCommandsMap.put(rootCommandId, new
ArrayList<AsyncTasks>());
Line 236: }
Line 237: rootCommandIdToCommandsMap.get(rootCommandId).add(task);
Use MultiValueMapUtils
Line 238: }
Line 239: return rootCommandIdToCommandsMap;
Line 240: }
Line 241:
....................................................
Commit Message
Line 21: which have vdsm id are added to the partiallyCompletedCommandTasks
Line 22: list. On storage up event when AddStoragePoolExistingTasks is called
Line 23: The task is marked for failure and once polling is done, they are
Line 24: failed and removed from database.
Line 25:
Please add a link to the feature page
Line 26: Change-Id: I3a979d816d9ec8cf25119a33742c8e6af4ff42a8
--
To view, visit http://gerrit.ovirt.org/15630
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a979d816d9ec8cf25119a33742c8e6af4ff42a8
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches