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

Initialize vertx redis client classes using SplittableRandom at runtime #15864

Merged
merged 1 commit into from
Mar 19, 2021
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,15 @@ HealthBuildItem addHealthCheck(RedisBuildTimeConfig buildTimeConfig) {
}

@BuildStep
RuntimeInitializedClassBuildItem initializeBulkTypeDuringRuntime() {
return new RuntimeInitializedClassBuildItem(BulkType.class.getName());
public void registerRuntimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem> producer) {
producer.produce(new RuntimeInitializedClassBuildItem(BulkType.class.getName()));
// Classes using SplittableRandom, which need to be runtime initialized
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisSentinelClient"));
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.Slots"));
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisClusterConnection"));
// RedisClusterConnections is referenced from RedisClusterClient. Thus, we need to runtime-init
// that too.
producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisClusterClient"));
}

@BuildStep
Expand Down