!WORKAROUND ONLY
- during node reconciliation statsManager could join together 2 similar
sets of statistics notifications and hit duplicate values during
processing - here we just skip those duplicates in order not to loose
stats working thread and finish actual multipart
Change-Id: I526ab5439055ac565bfaa08e84e5043e8764846a
Signed-off-by: Michal Rehak <mirehak@cisco.com>
public class StatListenCommitFlow extends StatAbstractListenCommit<Flow, OpendaylightFlowStatisticsListener>
implements OpendaylightFlowStatisticsListener {
public class StatListenCommitFlow extends StatAbstractListenCommit<Flow, OpendaylightFlowStatisticsListener>
implements OpendaylightFlowStatisticsListener {
- private static final Logger LOG = LoggerFactory.getLogger(StatListenCommitFlow.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(StatListenCommitFlow.class);
private static final String ALIEN_SYSTEM_FLOW_ID = "#UF$TABLE*";
private static final String ALIEN_SYSTEM_FLOW_ID = "#UF$TABLE*";
final List<FlowHashIdMap> flowHashMap = flowHashMapping.getFlowHashIdMap() != null
? flowHashMapping.getFlowHashIdMap() : Collections.<FlowHashIdMap> emptyList();
for (final FlowHashIdMap flowHashId : flowHashMap) {
final List<FlowHashIdMap> flowHashMap = flowHashMapping.getFlowHashIdMap() != null
? flowHashMapping.getFlowHashIdMap() : Collections.<FlowHashIdMap> emptyList();
for (final FlowHashIdMap flowHashId : flowHashMap) {
- flowIdByHash.put(flowHashId.getKey(), flowHashId.getFlowId());
+ try {
+ flowIdByHash.put(flowHashId.getKey(), flowHashId.getFlowId());
+ } catch (Exception e) {
+ LOG.warn("flow hashing hit a duplicate for {} -> {}", flowHashId.getKey(), flowHashId.getFlowId());
+ }