Liron Aravot has posted comments on this change.

Change subject: core : BLL changes for Multi-Tier fencing
......................................................................


Patch Set 12: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java
Line 262:             ExecutorCompletionService<FenceInvocationResult> ecs = 
ThreadPoolUtil.createCompletionService(tasks);
Line 263:             switch (getParameters().getAction()) {
Line 264:             case Start:
Line 265:                 f1 = ecs.take();
Line 266:                 if (f1.get().getOrder() == FenceAgentOrder.Primary) {
styling : i'd move this code to a method..now it's in two places and a bit hard 
to read.
Line 267:                     primaryResult = f1.get();
Line 268:                 }
Line 269:                 else {
Line 270:                     secondaryResult = f1.get();


Line 263:             switch (getParameters().getAction()) {
Line 264:             case Start:
Line 265:                 f1 = ecs.take();
Line 266:                 if (f1.get().getOrder() == FenceAgentOrder.Primary) {
Line 267:                     primaryResult = f1.get();
relevant to all of this method :   Future.get() can throw an exception if there 
was a thrown exception during the execution of the Future, in case of start we 
would want to catch it here and then perform take on the second future..
Line 268:                 }
Line 269:                 else {
Line 270:                     secondaryResult = f1.get();
Line 271:                 }


Line 298:                 if (f1.get().getOrder() == FenceAgentOrder.Primary) {
Line 299:                     primaryResult = f1.get();
Line 300:                     secondaryResult = f2.get();
Line 301:                 }
Line 302:                 else {
you can move the else's line up when you rebase..
Line 303:                     primaryResult = f2.get();
Line 304:                     secondaryResult = f1.get();
Line 305:                 }
Line 306:                 if (primaryResult.isSucceeded() && 
secondaryResult.isSucceeded()) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I82f243593f2b361ca75d97e06f9aede246d4a1b1
Gerrit-PatchSet: 12
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: liron aravot <liron.ara...@gmail.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to