Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
6145
Description
The following code is from SalFlowServiceImpl.updateFlow (and annotated):
//STEP 1: HERE THE FLOW IS MARKED FOR DELETION BUT NOT ACTUALLY DELETED. THE MARK IS BASED ON THE FLOW HASH
deviceFlowRegistry.markToBeremoved(flowRegistryKey);
if (itemLifecycleListener != null) {
final FlowDescriptor flowDescriptor = deviceContext.getDeviceFlowRegistry().retrieveIdForFlow(flowRegistryKey);
if (flowDescriptor != null)
}
//if provided, store flow id to flow registry
if (flowRef != null) {
final FlowId flowId = flowRef.getValue().firstKeyOf(Flow.class, FlowKey.class).getId();
final FlowDescriptor flowDescriptor = FlowDescriptorFactory.create(updated.getTableId(), flowId);
STEP 2: HERE THE FLOW IS RE-ADDED...
deviceFlowRegistry.store(updatedflowRegistryKey, flowDescriptor);
STEP 3: STEP 3: DeviceFlowRegistryImpl.removeMarked is called resulting in the removing of a flow that should not be removed because it was in fact re-added right afterwards. Next time the flow is updated via an OFPST_FLOW it is missing the flow id and therefor receives a generated "alien" id.