Skip to content

Commit 100e1a7

Browse files
fix: change server sequence (#108)
1 parent cc1001d commit 100e1a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

platform-grpc-service-framework/src/main/java/org/hypertrace/core/serviceframework/grpc/GrpcPlatformServiceContainer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,15 @@ protected void doInit() {
9797
serviceContainerEnvironment))
9898
.collect(Collectors.toUnmodifiableList());
9999

100+
// Servers are processed in order. We want in process to be the last to start (so health check
101+
// only returns when all other servers are up) and the last to shut down (so all other servers
102+
// have drained external requests)
100103
this.servers =
101104
Stream.concat(
105+
providedServers.stream(),
102106
Stream.of(
103107
new ConstructedServer(
104-
this.getInProcessServerName(), inProcessServerBuilder.build())),
105-
providedServers.stream())
108+
this.getInProcessServerName(), inProcessServerBuilder.build())))
106109
.collect(Collectors.toUnmodifiableList());
107110

108111
this.healthClient =

0 commit comments

Comments
 (0)