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

Remove deprecated reactive datasource config properties #30556

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
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 @@ -100,15 +100,6 @@ public class DataSourceReactiveRuntimeConfig {
@ConfigItem
public PfxConfiguration keyCertificatePfx = new PfxConfiguration();

/**
* Deprecated: this was removed and is no longer available.
*
* @Deprecated
*/
@ConfigItem
@Deprecated
public Optional<Boolean> threadLocal = Optional.empty();

/**
* The number of reconnection attempts when a pooled connection cannot be established on first try.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ private DB2Pool initialize(Vertx vertx,
// io.quarkus.micrometer.runtime.binder.vertx.VertxMeterBinderAdapter.extractClientName
connectOptions.setMetricsName("db2|" + dataSourceName);

if (dataSourceReactiveRuntimeConfig.threadLocal.isPresent()) {
log.warn(
"Configuration element 'thread-local' on Reactive datasource connections is deprecated and will be ignored. The started pool will always be based on a per-thread separate pool now.");
}
return createPool(vertx, poolOptions, connectOptions, dataSourceName);
}

Expand Down Expand Up @@ -161,13 +157,7 @@ private DB2ConnectOptions toConnectOptions(DataSourceRuntimeConfig dataSourceRun
}
}

if (dataSourceReactiveDB2Config.cachePreparedStatements.isPresent()) {
log.warn(
"datasource.reactive.db2.cache-prepared-statements is deprecated, use datasource.reactive.cache-prepared-statements instead");
connectOptions.setCachePreparedStatements(dataSourceReactiveDB2Config.cachePreparedStatements.get());
} else {
connectOptions.setCachePreparedStatements(dataSourceReactiveRuntimeConfig.cachePreparedStatements);
}
connectOptions.setCachePreparedStatements(dataSourceReactiveRuntimeConfig.cachePreparedStatements);

connectOptions.setSsl(dataSourceReactiveDB2Config.ssl);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
package io.quarkus.reactive.db2.client.runtime;

import java.util.Optional;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;

@ConfigGroup
public class DataSourceReactiveDB2Config {

/**
* Whether prepared statements should be cached on the client side.
*
* @deprecated use {@code datasource.reactive.cache-prepared-statements} instead.
*/
@ConfigItem
@Deprecated
public Optional<Boolean> cachePreparedStatements = Optional.empty();

/**
* Whether SSL/TLS is enabled.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ private MSSQLPool initialize(Vertx vertx,
// io.quarkus.micrometer.runtime.binder.vertx.VertxMeterBinderAdapter.extractClientName
mssqlConnectOptions.setMetricsName("mssql|" + dataSourceName);

if (dataSourceReactiveRuntimeConfig.threadLocal.isPresent()) {
log.warn(
"Configuration element 'thread-local' on Reactive datasource connections is deprecated and will be ignored. The started pool will always be based on a per-thread separate pool now.");
}
return createPool(vertx, poolOptions, mssqlConnectOptions, dataSourceName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@
@ConfigGroup
public class DataSourceReactiveMySQLConfig {

/**
* Whether prepared statements should be cached on the client side.
*
* @deprecated use {@code datasource.reactive.cache-prepared-statements} instead.
*/
@ConfigItem
@Deprecated
public Optional<Boolean> cachePreparedStatements = Optional.empty();

/**
* Charset for connections.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ private MySQLPool initialize(Vertx vertx,
// io.quarkus.micrometer.runtime.binder.vertx.VertxMeterBinderAdapter.extractClientName
mysqlConnectOptions.setMetricsName("mysql|" + dataSourceName);

if (dataSourceReactiveRuntimeConfig.threadLocal.isPresent()) {
log.warn(
"Configuration element 'thread-local' on Reactive datasource connections is deprecated and will be ignored. The started pool will always be based on a per-thread separate pool now.");
}
return createPool(vertx, poolOptions, mysqlConnectOptions, dataSourceName);
}

Expand Down Expand Up @@ -166,13 +162,7 @@ private MySQLConnectOptions toMySQLConnectOptions(DataSourceRuntimeConfig dataSo
}
}

if (dataSourceReactiveMySQLConfig.cachePreparedStatements.isPresent()) {
log.warn(
"datasource.reactive.mysql.cache-prepared-statements is deprecated, use datasource.reactive.cache-prepared-statements instead");
mysqlConnectOptions.setCachePreparedStatements(dataSourceReactiveMySQLConfig.cachePreparedStatements.get());
} else {
mysqlConnectOptions.setCachePreparedStatements(dataSourceReactiveRuntimeConfig.cachePreparedStatements);
}
mysqlConnectOptions.setCachePreparedStatements(dataSourceReactiveRuntimeConfig.cachePreparedStatements);

if (dataSourceReactiveMySQLConfig.charset.isPresent()) {
mysqlConnectOptions.setCharset(dataSourceReactiveMySQLConfig.charset.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ private OraclePool initialize(Vertx vertx,
// io.quarkus.micrometer.runtime.binder.vertx.VertxMeterBinderAdapter.extractClientName
oracleConnectOptions.setMetricsName("oracle|" + dataSourceName);

if (dataSourceReactiveRuntimeConfig.threadLocal.isPresent()) {
log.warn(
"Configuration element 'thread-local' on Reactive datasource connections is deprecated and will be ignored. The started pool will always be based on a per-thread separate pool now.");
}
return createPool(vertx, poolOptions, oracleConnectOptions, dataSourceName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@
@ConfigGroup
public class DataSourceReactivePostgreSQLConfig {

/**
* Whether prepared statements should be cached on the client side.
*
* @deprecated use {@code datasource.reactive.cache-prepared-statements} instead.
*/
@ConfigItem
@Deprecated
public Optional<Boolean> cachePreparedStatements = Optional.empty();

/**
* The maximum number of inflight database commands that can be pipelined.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ private PgPool initialize(Vertx vertx,
// See io.quarkus.micrometer.runtime.binder.vertx.VertxMeterBinderAdapter.extractPrefix and
// io.quarkus.micrometer.runtime.binder.vertx.VertxMeterBinderAdapter.extractClientName
pgConnectOptions.setMetricsName("postgresql|" + dataSourceName);
if (dataSourceReactiveRuntimeConfig.threadLocal.isPresent()) {
log.warn(
"Configuration element 'thread-local' on Reactive datasource connections is deprecated and will be ignored. The started pool will always be based on a per-thread separate pool now.");
}

return createPool(vertx, poolOptions, pgConnectOptions, dataSourceName);
}

Expand Down Expand Up @@ -161,14 +158,7 @@ private PgConnectOptions toPgConnectOptions(DataSourceRuntimeConfig dataSourceRu
}
}

if (dataSourceReactivePostgreSQLConfig.cachePreparedStatements.isPresent()) {
log.warn(
"datasource.reactive.postgresql.cache-prepared-statements is deprecated, use datasource.reactive.cache-prepared-statements instead");
pgConnectOptions
.setCachePreparedStatements(dataSourceReactivePostgreSQLConfig.cachePreparedStatements.get());
} else {
pgConnectOptions.setCachePreparedStatements(dataSourceReactiveRuntimeConfig.cachePreparedStatements);
}
pgConnectOptions.setCachePreparedStatements(dataSourceReactiveRuntimeConfig.cachePreparedStatements);

if (dataSourceReactivePostgreSQLConfig.pipeliningLimit.isPresent()) {
pgConnectOptions.setPipeliningLimit(dataSourceReactivePostgreSQLConfig.pipeliningLimit.getAsInt());
Expand Down