Vered Volansky has posted comments on this change.

Change subject: core: Add log when task could not end action.
......................................................................


Patch Set 4: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/EntityMultiAsyncTasks.java
Line 205:                         if (task.getParameters() != null
Line 206:                                 && 
task.getParameters().getDbAsyncTask() != null
Line 207:                                 && 
task.getParameters().getDbAsyncTask().getaction_type() == getActionType()
Line 208:                                 && (task.getState() == 
AsyncTaskState.Initializing || task.getState() == AsyncTaskState.WaitForPoll)) {
Line 209:                             log.debugFormat("Task id {0} Changed its 
task state from {1} to polling.",
I think you should use the enum state here instead of polling. Both to be 
aligned with the first state and for encapsulation sake.
Also:
s/Changed/changed, s/task state/state. There's some duplicity in the second.
Line 210:                                     task.getTaskID(),
Line 211:                                     task.getState());
Line 212:                             task.setState(AsyncTaskState.Polling);
Line 213:                         }


Line 223:                     for (EntityAsyncTask task : _listTasks.values()) {
Line 224:                         if (task.getParameters() != null && 
task.getParameters().getDbAsyncTask() != null
Line 225:                                 && 
task.getParameters().getDbAsyncTask().getaction_type() == currTaskActionType
Line 226:                                 && task.getState() == 
AsyncTaskState.Initializing) {
Line 227:                             log.debugFormat("Task id {0} Changed its 
task state from {1} to wait for poll.",
Same as above for wait for poll and others.
Line 228:                                     task.getTaskID(),
Line 229:                                     task.getState());
Line 230:                             task.setState(AsyncTaskState.WaitForPoll);
Line 231:                         }


Line 242:     public boolean getAllCleared() {
Line 243:         synchronized (_listTasks) {
Line 244:             for (EntityAsyncTask task : _listTasks.values()) {
Line 245:                 if (!taskWasCleared(task)) {
Line 246:                     log.infoFormat("[within thread]: Some of the 
entity {0} were not cleared yet (Task {1} is in state {2}).",
Entity is singular and "some of" and "were" are plural. If it should be 
entities then it's not aligned with the first parameter. So this should be 
re-thought.
Line 247:                             getContainerId(),
Line 248:                             task.getTaskID(),
Line 249:                             task.getState());
Line 250:                     return false;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia1e4700676622b23c79a388b6aa3b92ae1aa15e9
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to