Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a separate indis warmup executor service #961

Merged
merged 2 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ and what APIs have changed, if applicable.

## [Unreleased]

## [29.49.1] - 2023-12-21
- Use a separate indis warmup executor service

## [29.49.0] - 2023-12-21
- Bump minor version due to internal LinkedIn tooling requirement. No functional changes.

Expand Down Expand Up @@ -5594,7 +5597,8 @@ patch operations can re-use these classes for generating patch messages.

## [0.14.1]

[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.49.0...master
[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.49.1...master
[29.49.1]: https://github.com/linkedin/rest.li/compare/v29.49.0...v29.49.1
[29.49.0]: https://github.com/linkedin/rest.li/compare/v29.48.9...v29.49.0
[29.48.9]: https://github.com/linkedin/rest.li/compare/v29.48.8...v29.48.9
[29.48.8]: https://github.com/linkedin/rest.li/compare/v29.48.7...v29.48.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ public D2Client build()
executorsToShutDown.add(_config.startUpExecutorService);
}

if (_config.indisStartUpExecutorService == null)
shivamgupta1 marked this conversation as resolved.
Show resolved Hide resolved
{
_config.indisStartUpExecutorService =
Executors.newScheduledThreadPool(0, new NamedThreadFactory("INDIS D2 StartupOnlyExecutor"));
executorsToShutDown.add(_config.indisStartUpExecutorService);
}

if (_config._executorService == null)
{
LOG.warn("No executor service passed as argument. Pass it for " +
Expand Down Expand Up @@ -189,6 +196,7 @@ public D2Client build()
_config.sslSessionValidatorFactory,
_config.zkConnectionToUseForLB,
_config.startUpExecutorService,
_config.indisStartUpExecutorService,
_config.jmxManager,
_config.d2JmxManagerPrefix,
_config.zookeeperReadWindowMs,
Expand Down
3 changes: 3 additions & 0 deletions d2/src/main/java/com/linkedin/d2/balancer/D2ClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public class D2ClientConfig
public SslSessionValidatorFactory sslSessionValidatorFactory = null;
ZKPersistentConnection zkConnectionToUseForLB = null;
public ScheduledExecutorService startUpExecutorService = null;
public ScheduledExecutorService indisStartUpExecutorService = null;
public JmxManager jmxManager = new NoOpJmxManager();
public String d2JmxManagerPrefix = "UnknownPrefix";
boolean enableRelativeLoadBalancer = false;
Expand Down Expand Up @@ -185,6 +186,7 @@ public D2ClientConfig()
SslSessionValidatorFactory sslSessionValidatorFactory,
ZKPersistentConnection zkConnection,
ScheduledExecutorService startUpExecutorService,
ScheduledExecutorService indisStartUpExecutorService,
JmxManager jmxManager,
String d2JmxManagerPrefix,
int zookeeperReadWindowMs,
Expand Down Expand Up @@ -251,6 +253,7 @@ public D2ClientConfig()
this.sslSessionValidatorFactory = sslSessionValidatorFactory;
this.zkConnectionToUseForLB = zkConnection;
this.startUpExecutorService = startUpExecutorService;
this.indisStartUpExecutorService = indisStartUpExecutorService;
this.jmxManager = jmxManager;
this.d2JmxManagerPrefix = d2JmxManagerPrefix;
this.zookeeperReadWindowMs = zookeeperReadWindowMs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public LoadBalancerWithFacilities create(D2ClientConfig config)

if (config.warmUp)
{
balancer = new WarmUpLoadBalancer(balancer, xdsLoadBalancer, config.startUpExecutorService, config.indisFsBasePath,
balancer = new WarmUpLoadBalancer(balancer, xdsLoadBalancer, config.indisStartUpExecutorService, config.indisFsBasePath,
config.d2ServicePath, config.indisDownstreamServicesFetcher, config.warmUpTimeoutSeconds,
config.warmUpConcurrentRequests, config.dualReadStateManager);
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=29.49.0
version=29.49.1
group=com.linkedin.pegasus
org.gradle.configureondemand=true
org.gradle.parallel=true
Expand Down
Loading