Liron Ar has posted comments on this change.

Change subject: core: Execute clear tasks with new thread.
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.ovirt.org/#/c/23724/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java:

Line 361:         return getReturnValue();
Line 362:     }
Line 363: 
Line 364:     private void clearAsyncTasksWithOutVdsmId() {
Line 365:         if (getReturnValue().getTaskPlaceHolderIdList().size() > 0) {
please change to isEmpty
Line 366:             TransactionSupport.executeInNewTransaction(new 
TransactionMethod<Object>() {
Line 367:                 @Override
Line 368:                 public Void runInTransaction() {
Line 369:                     for (final Guid asyncTaskId : 
getReturnValue().getTaskPlaceHolderIdList()) {


Line 363: 
Line 364:     private void clearAsyncTasksWithOutVdsmId() {
Line 365:         if (getReturnValue().getTaskPlaceHolderIdList().size() > 0) {
Line 366:             TransactionSupport.executeInNewTransaction(new 
TransactionMethod<Object>() {
Line 367:                 @Override
should be  TransactionMethod<Void>
Line 368:                 public Void runInTransaction() {
Line 369:                     for (final Guid asyncTaskId : 
getReturnValue().getTaskPlaceHolderIdList()) {
Line 370:                         AsyncTasks task = 
getAsyncTaskDao().get(asyncTaskId);
Line 371:                         if (task != null && 
Guid.isNullOrEmpty(task.getVdsmTaskId())) {


Line 365:         if (getReturnValue().getTaskPlaceHolderIdList().size() > 0) {
Line 366:             TransactionSupport.executeInNewTransaction(new 
TransactionMethod<Object>() {
Line 367:                 @Override
Line 368:                 public Void runInTransaction() {
Line 369:                     for (final Guid asyncTaskId : 
getReturnValue().getTaskPlaceHolderIdList()) {
final is unneeded
Line 370:                         AsyncTasks task = 
getAsyncTaskDao().get(asyncTaskId);
Line 371:                         if (task != null && 
Guid.isNullOrEmpty(task.getVdsmTaskId())) {
Line 372:                             
AsyncTaskManager.removeTaskFromDbByTaskId(task.getTaskId());
Line 373:                         }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3434c2dbd605e741b2cfbbede8c4a120f21ca9fe
Gerrit-PatchSet: 1
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: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to