Skip to content

Commit

Permalink
Merge branch '3.9' of https://github.com/JumpMind/symmetric-ds.git in…
Browse files Browse the repository at this point in the history
…to 3.9
  • Loading branch information
chenson42 committed May 16, 2018
2 parents 24eb92e + 5f7276b commit 8620af8
Showing 1 changed file with 15 additions and 0 deletions.
Expand Up @@ -634,6 +634,8 @@ public synchronized boolean start() {
return start(true);
}

private boolean isFirstStart = true;

public synchronized boolean start(boolean startJobs) {
isInitialized = false;
if (!starting && !started) {
Expand Down Expand Up @@ -703,6 +705,12 @@ public synchronized boolean start(boolean startJobs) {
if (parameterService.isRegistrationServer()) {
this.updateService.init();
}

if(isFirstStart){
isFirstStart = false;
}else{
this.clearCaches();
}

lastRestartTime = new Date();
statisticManager.incrementRestart();
Expand Down Expand Up @@ -990,14 +998,21 @@ public void openRegistration(String nodeGroupId, String externalId) {
}

public void clearCaches() {
getExtensionService().refresh();
getTriggerRouterService().clearCache();
getParameterService().rereadParameters();
getTransformService().clearCache();
getDataLoaderService().clearCache();
getConfigurationService().initDefaultChannels();
getConfigurationService().clearCache();
getNodeService().flushNodeAuthorizedCache();
getNodeService().flushNodeCache();
getNodeService().flushNodeGroupCache();
getJobManager().startJobsAfterConfigChange();
getLoadFilterService().clearCache();
getMonitorService().flushMonitorCache();
getMonitorService().flushNotificationCache();
getFileSyncService().clearCache();
}

public void reOpenRegistration(String nodeId) {
Expand Down

0 comments on commit 8620af8

Please sign in to comment.