X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fconfig-persister-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fpersist%2Fimpl%2FConfigPusherImpl.java;h=cf9958e7f8abf44303aeb18f79a77d01b62d7a9b;hb=a30d7fb04b2134d68399a20eaf859e317d40c71a;hp=b06219c978558cb69c92bb353d279cb0f8c480cb;hpb=c6b87f96d930b1873cc4a5091b7413e7ad26f6dc;p=controller.git diff --git a/opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusherImpl.java b/opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusherImpl.java index b06219c978..cf9958e7f8 100644 --- a/opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusherImpl.java +++ b/opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusherImpl.java @@ -78,17 +78,9 @@ public class ConfigPusherImpl implements ConfigPusher { synchronized (autoCloseables) { autoCloseables.add(jmxNotificationHandler); } - /* - * We have completed initial configuration. At this point - * it is good idea to perform garbage collection to prune - * any garbage we have accumulated during startup. - */ - LOG.debug("Running post-initialization garbage collection..."); - System.gc(); - LOG.debug("Post-initialization garbage collection completed."); - LOG.debug("ConfigPusher has pushed configs {}, gc completed", configs); - } - catch (NetconfDocumentedException e) { + + LOG.debug("ConfigPusher has pushed configs {}", configs); + } catch (NetconfDocumentedException e) { LOG.error("Error pushing configs {}",configs); throw new IllegalStateException(e); } @@ -123,17 +115,20 @@ public class ConfigPusherImpl implements ConfigPusher { */ private synchronized EditAndCommitResponse pushConfigWithConflictingVersionRetries(ConfigSnapshotHolder configSnapshotHolder) throws NetconfDocumentedException { ConflictingVersionException lastException; - Stopwatch stopwatch = new Stopwatch().start(); + Stopwatch stopwatch = new Stopwatch(); do { String idForReporting = configSnapshotHolder.toString(); SortedSet expectedCapabilities = checkNotNull(configSnapshotHolder.getCapabilities(), "Expected capabilities must not be null - %s, check %s", idForReporting, configSnapshotHolder.getClass().getName()); try (NetconfOperationService operationService = getOperationServiceWithRetries(expectedCapabilities, idForReporting)) { + if(!stopwatch.isRunning()) { + stopwatch.start(); + } return pushConfig(configSnapshotHolder, operationService); } catch (ConflictingVersionException e) { lastException = e; - LOG.debug("Conflicting version detected, will retry after timeout"); + LOG.info("Conflicting version detected, will retry after timeout"); sleep(); } } while (stopwatch.elapsed(TimeUnit.MILLISECONDS) < conflictingVersionTimeoutMillis);