Statistics collection fix 49/24349/3
authorMichal Rehak <mirehak@cisco.com>
Tue, 21 Jul 2015 14:45:49 +0000 (16:45 +0200)
committermichal rehak <mirehak@cisco.com>
Tue, 8 Dec 2015 17:02:48 +0000 (17:02 +0000)
 - cleaning up flow registry
 - keep stats scheduler alive even if connection is not in state WORKING

Change-Id: If1f03b224f497653769fc2cca815afdc9029df95
Signed-off-by: Michal Rehak <mirehak@cisco.com>
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtils.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsManagerImpl.java

index b6ce236a5e9fff4086ddd3e47847c5c54fdc5499..ec74cc43b8055ebfc59069425ed8877f886206ad 100644 (file)
@@ -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();
         }
     }
 
index cfb430d8f71cc073ff457d3b67eb9e8029339199..b1cfd251cfad8792e68d60fb58da277ae24b95ea 100644 (file)
@@ -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);
             }
         });
     }