From: Michal Rehak Date: Tue, 21 Jul 2015 14:45:49 +0000 (+0200) Subject: Statistics collection fix X-Git-Tag: release/beryllium~37^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=52f69b2f96908053793d76807ee5e82b4dc21e4f;p=openflowplugin.git 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 --- 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); } }); }