Committed by
Brian O'Connor
ONOS-2025 Corrected a logic error in the flow rule store that crept in during a …
…recent refactor. (175e8fde) Change-Id: I4a4cb097ba7aa23dd00ebe59e8ebbbff68630dae
Showing
1 changed file
with
12 additions
and
10 deletions
... | @@ -412,16 +412,18 @@ public class NewDistributedFlowRuleStore | ... | @@ -412,16 +412,18 @@ public class NewDistributedFlowRuleStore |
412 | SERIALIZER::encode, | 412 | SERIALIZER::encode, |
413 | master) | 413 | master) |
414 | .whenComplete((result, error) -> { | 414 | .whenComplete((result, error) -> { |
415 | - log.warn("Failed to storeBatch: {} to {}", operation, master); | 415 | + if (error != null) { |
416 | - | 416 | + log.warn("Failed to storeBatch: {} to {}", operation, master); |
417 | - Set<FlowRule> allFailures = operation.getOperations() | 417 | + |
418 | - .stream() | 418 | + Set<FlowRule> allFailures = operation.getOperations() |
419 | - .map(op -> op.target()) | 419 | + .stream() |
420 | - .collect(Collectors.toSet()); | 420 | + .map(op -> op.target()) |
421 | - | 421 | + .collect(Collectors.toSet()); |
422 | - notifyDelegate(FlowRuleBatchEvent.completed( | 422 | + |
423 | - new FlowRuleBatchRequest(operation.id(), Collections.emptySet()), | 423 | + notifyDelegate(FlowRuleBatchEvent.completed( |
424 | - new CompletedBatchOperation(false, allFailures, deviceId))); | 424 | + new FlowRuleBatchRequest(operation.id(), Collections.emptySet()), |
425 | + new CompletedBatchOperation(false, allFailures, deviceId))); | ||
426 | + } | ||
425 | }); | 427 | }); |
426 | } | 428 | } |
427 | 429 | ... | ... |
-
Please register or login to post a comment