From 52f69b2f96908053793d76807ee5e82b4dc21e4f Mon Sep 17 00:00:00 2001 From: Michal Rehak Date: Tue, 21 Jul 2015 16:45:49 +0200 Subject: [PATCH] Statistics collection fix - cleaning up flow registry - keep stats scheduler alive even if connection is not in state WORKING Change-Id: If1f03b224f497653769fc2cca815afdc9029df95 Signed-off-by: Michal Rehak --- .../impl/statistics/StatisticsGatheringUtils.java | 1 + .../impl/statistics/StatisticsManagerImpl.java | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtils.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtils.java index b6ce236a5e..ec74cc43b8 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtils.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtils.java @@ -256,6 +256,7 @@ public final class StatisticsGatheringUtils { LOG.trace("Reading of table features for table wit ID {} encountered execution exception {}.", i, e); } } + deviceContext.getDeviceFlowRegistry().removeMarked(); } } diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsManagerImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsManagerImpl.java index cfb430d8f7..b1cfd251cf 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsManagerImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsManagerImpl.java @@ -151,10 +151,8 @@ public class StatisticsManagerImpl implements StatisticsManager, StatisticsManag timeCounter.addTimeMark(); LOG.info("Statistics gathering for single node was not successful: {}", throwable.getMessage()); LOG.debug("Statistics gathering for single node was not successful.. ", throwable); - if (ConnectionContext.CONNECTION_STATE.WORKING.equals(deviceContext.getPrimaryConnectionContext().getConnectionState())) { - calculateTimerDelay(timeCounter); - scheduleNextPolling(deviceContext, statisticsContext, timeCounter); - } + calculateTimerDelay(timeCounter); + scheduleNextPolling(deviceContext, statisticsContext, timeCounter); } }); } -- 2.36.6