Skip to content

Commit

Permalink
Merge pull request #35 from andrewshan/andr-conflict-resolve
Browse files Browse the repository at this point in the history
fix the log flush issue
  • Loading branch information
andrewshan authored Dec 14, 2021
2 parents e2e9a7d + 195891d commit d9e1621
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions polaris-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,13 @@
<artifactId>polaris-test-mock-discovery</artifactId>
<version>${project.version}</version>
</dependency>

<!-- shade -->
<dependency>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-all</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private void submitServiceHandler(ServiceUpdateTask updateTask, long delayMs) {
LOG.info("[ServerConnector]task for service {} has been scheduled builtin", updateTask);
buildInExecutor.schedule(updateTask, delayMs, TimeUnit.MILLISECONDS);
} else {
LOG.info("[ServerConnector]task for service {} has been scheduled discover", updateTask);
LOG.debug("[ServerConnector]task for service {} has been scheduled discover", updateTask);
sendDiscoverExecutor.schedule(updateTask, delayMs, TimeUnit.MILLISECONDS);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public void addUpdateTaskSet() {
if (taskType.compareAndSet(Type.FIRST, Type.LONG_RUNNING)) {
targetClusterType.set(ClusterType.SERVICE_DISCOVER_CLUSTER);
grpcConnector.addLongRunningTask(this);
LOG.info("[ServerConnector]task for service {} has been scheduled updated", this);
}
}

Expand All @@ -199,6 +200,7 @@ public boolean needUpdate() {
}
long nowMs = System.currentTimeMillis();
return nowMs - lastUpdateTime.get() >= refreshIntervalMs;

}

@Override
Expand Down

0 comments on commit d9e1621

Please sign in to comment.