Merge "BUG 1839 - HTTP delete of non existing data"
[controller.git] / opendaylight / md-sal / statistics-manager / src / main / java / org / opendaylight / controller / md / statistics / manager / impl / StatisticsManagerImpl.java
index b848303db3a3f1351aaf420a8f2e6921e3e97a87..0f8030f6204f18242d4b269549f805d11c5ab2d2 100644 (file)
@@ -67,8 +67,8 @@ public class StatisticsManagerImpl implements StatisticsManager, Runnable {
 
    private final static Logger LOG = LoggerFactory.getLogger(StatisticsManagerImpl.class);
 
-   private static final int QUEUE_DEPTH = 1000;
-   private static final int MAX_BATCH = 1;
+   private static final int QUEUE_DEPTH = 5000;
+   private static final int MAX_BATCH = 100;
 
    private final BlockingQueue<StatDataStoreOperation> dataStoreOperQueue = new LinkedBlockingDeque<>(QUEUE_DEPTH);
 
@@ -202,9 +202,9 @@ public class StatisticsManagerImpl implements StatisticsManager, Runnable {
                    }
                } while (op != null);
 
-                   LOG.trace("Processed {} operations, submitting transaction {}", ops, tx.getIdentifier());
+               LOG.trace("Processed {} operations, submitting transaction {}", ops, tx.getIdentifier());
 
-                   tx.submit(); //.checkedGet();
+                   tx.submit().checkedGet();
            } catch (final InterruptedException e) {
                LOG.warn("Stat Manager DS Operation thread interupted!", e);
                finishing = true;
@@ -282,6 +282,7 @@ public class StatisticsManagerImpl implements StatisticsManager, Runnable {
    @Override
    public void disconnectedNodeUnregistration(final InstanceIdentifier<Node> nodeIdent) {
        flowListeningCommiter.cleanForDisconnect(nodeIdent);
+
        for (final StatPermCollector collector : statCollectors) {
            if (collector.disconnectedNodeUnregistration(nodeIdent)) {
                if ( ! collector.hasActiveNodes()) {