This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new c2e05d94592 Add documentation for P6Spy support (#34059)
c2e05d94592 is described below
commit c2e05d94592ccfabc153c96e27b28beaa2d4fb69
Author: Ling Hengqian <[email protected]>
AuthorDate: Fri Dec 20 14:00:45 2024 +0800
Add documentation for P6Spy support (#34059)
---
.../graalvm-native-image/_index.cn.md | 6 +-
.../graalvm-native-image/_index.en.md | 6 +-
.../optional-plugins/clickhouse/_index.cn.md | 12 ++
.../optional-plugins/clickhouse/_index.en.md | 12 ++
.../optional-plugins/hiveserver2/_index.cn.md | 4 +-
.../optional-plugins/hiveserver2/_index.en.md | 4 +-
.../special-api/transaction/seata.cn.md | 12 ++
.../special-api/transaction/seata.en.md | 12 ++
.../_index.cn.md} | 0
.../_index.en.md} | 0
.../unsupported/p6spy/_index.cn.md | 154 +++++++++++++++++
.../unsupported/p6spy/_index.en.md | 156 +++++++++++++++++
.../optional-plugins/seata-at/_index.cn.md | 33 +---
.../optional-plugins/seata-at/_index.en.md | 2 +-
.../startup/graalvm-native-image.cn.md | 29 ++++
.../startup/graalvm-native-image.en.md | 29 ++++
.../reflect-config.json | 190 +++++++++++++++------
.../resource-config.json | 40 +----
.../reflect-config.json | 4 +-
pom.xml | 2 +-
test/native/pom.xml | 5 -
.../natived/jdbc/databases/ClickHouseTest.java | 12 +-
.../test/natived/jdbc/databases/MySQLTest.java | 11 +-
.../test/natived/jdbc/databases/OpenGaussTest.java | 12 +-
.../hive/ZookeeperServiceDiscoveryTest.java | 12 +-
.../test-native/yaml/jdbc/databases/mysql.yaml | 6 +-
.../test-native/yaml/jdbc/databases/opengauss.yaml | 6 +-
27 files changed, 598 insertions(+), 173 deletions(-)
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
index ac678804be4..ed2a75dbc69 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
@@ -47,7 +47,7 @@ java.beans.Introspector was unintentionally initialized at
build time. To see wh
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
- <version>0.10.3</version>
+ <version>0.10.4</version>
<extensions>true</extensions>
<configuration>
<buildArgs>
@@ -85,12 +85,12 @@ java.beans.Introspector was unintentionally initialized at
build time. To see wh
```groovy
plugins {
- id 'org.graalvm.buildtools.native' version '0.10.3'
+ id 'org.graalvm.buildtools.native' version '0.10.4'
}
dependencies {
implementation
'org.apache.shardingsphere:shardingsphere-jdbc:${shardingsphere.version}'
- implementation(group: 'org.graalvm.buildtools', name:
'graalvm-reachability-metadata', version: '0.10.3', classifier: 'repository',
ext: 'zip')
+ implementation(group: 'org.graalvm.buildtools', name:
'graalvm-reachability-metadata', version: '0.10.4', classifier: 'repository',
ext: 'zip')
}
graalvmNative {
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
index 680f492bd3f..e0bd4a94c10 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
@@ -49,7 +49,7 @@ and the documentation of GraalVM Native Build Tools shall
prevail.
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
- <version>0.10.3</version>
+ <version>0.10.4</version>
<extensions>true</extensions>
<configuration>
<buildArgs>
@@ -89,12 +89,12 @@ Reference
https://github.com/graalvm/native-build-tools/issues/572 .
```groovy
plugins {
- id 'org.graalvm.buildtools.native' version '0.10.3'
+ id 'org.graalvm.buildtools.native' version '0.10.4'
}
dependencies {
implementation
'org.apache.shardingsphere:shardingsphere-jdbc:${shardingsphere.version}'
- implementation(group: 'org.graalvm.buildtools', name:
'graalvm-reachability-metadata', version: '0.10.3', classifier: 'repository',
ext: 'zip')
+ implementation(group: 'org.graalvm.buildtools', name:
'graalvm-reachability-metadata', version: '0.10.4', classifier: 'repository',
ext: 'zip')
}
graalvmNative {
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
index 4c92ac01f19..9e12705225b 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
@@ -98,14 +98,20 @@ dataSources:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_0
+ username: default
+ password:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_1
+ username: default
+ password:
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_2
+ username: default
+ password:
rules:
- !SHARDING
tables:
@@ -305,14 +311,20 @@ dataSources:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_0?transactionSupport=true
+ username: default
+ password:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_1?transactionSupport=true
+ username: default
+ password:
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_2?transactionSupport=true
+ username: default
+ password:
rules:
- !SHARDING
tables:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
index 9b46f250e9b..0e81b120748 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
@@ -100,14 +100,20 @@ dataSources:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_0
+ username: default
+ password:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_1
+ username: default
+ password:
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_2
+ username: default
+ password:
rules:
- !SHARDING
tables:
@@ -311,14 +317,20 @@ dataSources:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_0?transactionSupport=true
+ username: default
+ password:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_1?transactionSupport=true
+ username: default
+ password:
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.clickhouse.jdbc.ClickHouseDriver
jdbcUrl: jdbc:ch://localhost:8123/demo_ds_2?transactionSupport=true
+ username: default
+ password:
rules:
- !SHARDING
tables:
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md
index 808b529cb50..28637148be3 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md
@@ -554,8 +554,8 @@ public class ExampleUtils {
assert null == System.getProperty("fixture.hive.ds2.jdbc-url");
String absolutePath =
Paths.get("src/test/resources/init.sql").toAbsolutePath().toString();
System.setProperty("fixture.hive.ds0.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_0;initFile=" + absolutePath);
- System.setProperty("fixture.hive.ds0.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_1;initFile=" + absolutePath);
- System.setProperty("fixture.hive.ds0.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_2;initFile=" + absolutePath);
+ System.setProperty("fixture.hive.ds1.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_1;initFile=" + absolutePath);
+ System.setProperty("fixture.hive.ds2.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_2;initFile=" + absolutePath);
return new HikariDataSource(config);
} finally {
System.clearProperty("fixture.hive.ds0.jdbc-url");
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md
index 6f1dd74cd39..4bc6a90939d 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md
@@ -562,8 +562,8 @@ public class ExampleUtils {
assert null == System.getProperty("fixture.hive.ds2.jdbc-url");
String absolutePath =
Paths.get("src/test/resources/init.sql").toAbsolutePath().toString();
System.setProperty("fixture.hive.ds0.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_0;initFile=" + absolutePath);
- System.setProperty("fixture.hive.ds0.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_1;initFile=" + absolutePath);
- System.setProperty("fixture.hive.ds0.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_2;initFile=" + absolutePath);
+ System.setProperty("fixture.hive.ds1.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_1;initFile=" + absolutePath);
+ System.setProperty("fixture.hive.ds2.jdbc-url",
"jdbc:hive2://localhost:10000/demo_ds_2;initFile=" + absolutePath);
return new HikariDataSource(config);
} finally {
System.clearProperty("fixture.hive.ds0.jdbc-url");
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.cn.md
index de095f27803..1584e879375 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.cn.md
@@ -609,3 +609,15 @@ public class CustomWebMvcConfigurer implements
WebMvcConfigurer {
5. 微服务实例 `a-service` 和 `b-service` 均为 Spring Boot 微服务,但使用的组件是 Spring WebFlux
而非 Spring WebMVC。
在反应式编程 API 下 ShardingSphere JDBC 无法处理 R2DBC DataSource,仅可处理 JDBC DataSource。
在使用 WebFlux 组件的 Spring Boot 微服务中应避免创建 ShardingSphere JDBC DataSource。
+
+### Log 配置
+
+在业务项目启动 Seata Client 后,可能看到如下的 Error Log。
+
+```shell
+[ERROR] 2024-12-20 11:46:43.878 [ForkJoinPool.commonPool-worker-1]
o.a.s.config.ConfigurationFactory - failed to load non-spring configuration
:not found service provider for : org.apache.seata.config.ConfigurationProvider
+org.apache.seata.common.loader.EnhancedServiceNotFoundException: not found
service provider for : org.apache.seata.config.ConfigurationProvider
+```
+
+根据 https://github.com/apache/incubator-seata/issues/6886 ,抛出此异常是 Seata Client
的预期行为。
+用户可通过在业务项目的 classpath 放置 `logback.xml` 对 Seata Client 的日志加以配置。
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.en.md
index b34d4c8af9c..0f860f01167 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.en.md
@@ -641,3 +641,15 @@ public class CustomWebMvcConfigurer implements
WebMvcConfigurer {
5. Both microservice instances `a-service` and `b-service` are Spring Boot
microservices, but the components used are Spring WebFlux instead of Spring
WebMVC.
ShardingSphere JDBC cannot handle R2DBC DataSource under the reactive
programming API, only JDBC DataSource.
Avoid creating ShardingSphere JDBC DataSource in Spring Boot microservices
using WebFlux components.
+
+### Log Configuration
+
+After starting Seata Client in a business project, you may see the following
Error Log.
+
+```shell
+[ERROR] 2024-12-20 11:46:43.878 [ForkJoinPool.commonPool-worker-1]
o.a.s.config.ConfigurationFactory - failed to load non-spring configuration
:not found service provider for : org.apache.seata.config.ConfigurationProvider
+org.apache.seata.common.loader.EnhancedServiceNotFoundException: not found
service provider for : org.apache.seata.config.ConfigurationProvider
+```
+
+According to https://github.com/apache/incubator-seata/issues/6886 , throwing
this exception is the expected behavior of Seata Client.
+Users can configure the log of Seata Client by placing `logback.xml` in the
classpath of the business project.
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/unsupported.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/unsupported/_index.cn.md
similarity index 100%
rename from
docs/document/content/user-manual/shardingsphere-jdbc/unsupported.cn.md
rename to
docs/document/content/user-manual/shardingsphere-jdbc/unsupported/_index.cn.md
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/unsupported.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/unsupported/_index.en.md
similarity index 100%
rename from
docs/document/content/user-manual/shardingsphere-jdbc/unsupported.en.md
rename to
docs/document/content/user-manual/shardingsphere-jdbc/unsupported/_index.en.md
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/unsupported/p6spy/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/unsupported/p6spy/_index.cn.md
new file mode 100644
index 00000000000..dd5418d15fa
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/unsupported/p6spy/_index.cn.md
@@ -0,0 +1,154 @@
++++
+title = "P6Spy"
+weight = 6
++++
+
+## 背景信息
+
+ShardingSphere 通过
`org.apache.shardingsphere:shardingsphere-infra-database-p6spy` 模块,
+对 `com.p6spy.engine.spy.P6SpyDriver` 提供部分支持。
+
+## 前提条件
+
+要在 ShardingSphere 的配置文件为 MySQL Server 数据节点使用 P6Spy, 可能的 Maven 依赖关系如下,
+
+```xml
+<dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc</artifactId>
+ <version>${shardingsphere.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>p6spy</groupId>
+ <artifactId>p6spy</artifactId>
+ <version>3.9.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.mysql</groupId>
+ <artifactId>mysql-connector-j</artifactId>
+ <version>9.1.0</version>
+ </dependency>
+</dependencies>
+```
+
+## 配置示例
+
+### 启动 MySQL Server
+
+编写 Docker Compose 文件来启动 MySQL Server。
+
+```yaml
+services:
+ mysql:
+ image: mysql:9.1.0
+ environment:
+ MYSQL_ROOT_PASSWORD: example
+ volumes:
+ - ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
+ ports:
+ - "3306:3306"
+```
+
+`./docker-entrypoint-initdb.d` 文件夹包含文件为 `init.sh`,内容如下,
+
+```shell
+#!/bin/bash
+set -e
+
+mysql -uroot -p"$MYSQL_ROOT_PASSWORD" <<EOSQL
+CREATE DATABASE demo_ds_0;
+CREATE DATABASE demo_ds_1;
+CREATE DATABASE demo_ds_2;
+EOSQL
+
+for i in "demo_ds_0" "demo_ds_1" "demo_ds_2"
+do
+mysql -uroot -p"$MYSQL_ROOT_PASSWORD" "$i" <<'EOSQL'
+CREATE TABLE IF NOT EXISTS t_order (
+ order_id BIGINT NOT NULL AUTO_INCREMENT,
+ order_type INT(11),
+ user_id INT NOT NULL,
+ address_id BIGINT NOT NULL,
+ status VARCHAR(50),
+ PRIMARY KEY (order_id)
+);
+EOSQL
+done
+```
+
+### 在业务项目创建 ShardingSphere 数据源
+
+在业务项目引入前提条件涉及的依赖后,在业务项目的 classpath 上编写 ShardingSphere 数据源的配置文件`demo.yaml`,
+
+```yaml
+dataSources:
+ ds_0:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.p6spy.engine.spy.P6SpyDriver
+ jdbcUrl: jdbc:p6spy:mysql://localhost:3306/demo_ds_0?sslMode=REQUIRED
+ username: root
+ password: example
+ ds_1:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.p6spy.engine.spy.P6SpyDriver
+ jdbcUrl: jdbc:p6spy:mysql://localhost:3306/demo_ds_1?sslMode=REQUIRED
+ username: root
+ password: example
+ ds_2:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.p6spy.engine.spy.P6SpyDriver
+ jdbcUrl: jdbc:p6spy:mysql://localhost:3306/demo_ds_2?sslMode=REQUIRED
+ username: root
+ password: example
+rules:
+- !SHARDING
+ tables:
+ t_order:
+ actualDataNodes:
+ keyGenerateStrategy:
+ column: order_id
+ keyGeneratorName: snowflake
+ defaultDatabaseStrategy:
+ standard:
+ shardingColumn: user_id
+ shardingAlgorithmName: inline
+ shardingAlgorithms:
+ inline:
+ type: INLINE
+ props:
+ algorithm-expression: ds_${user_id % 2}
+ keyGenerators:
+ snowflake:
+ type: SNOWFLAKE
+```
+
+### 享受集成
+
+创建 ShardingSphere 的数据源以享受集成,
+
+```java
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+public class ExampleUtils {
+ void test() throws SQLException {
+ HikariConfig config = new HikariConfig();
+ config.setJdbcUrl("jdbc:shardingsphere:classpath:demo.yaml");
+
config.setDriverClassName("org.apache.shardingsphere.driver.ShardingSphereDriver");
+ try (HikariDataSource dataSource = new HikariDataSource(config);
+ Connection connection = dataSource.getConnection();
+ Statement statement = connection.createStatement()) {
+ statement.execute("INSERT INTO t_order (user_id, order_type,
address_id, status) VALUES (1, 1, 1, 'INSERT_TEST')");
+ statement.executeQuery("SELECT * FROM t_order");
+ statement.execute("alter table t_order delete where order_id=1");
+ }
+ }
+}
+```
+
+## 使用限制
+
+目前仅支持为 MySQL JDBC Driver 配置 P6Spy。
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/unsupported/p6spy/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/unsupported/p6spy/_index.en.md
new file mode 100644
index 00000000000..ab5b29894ba
--- /dev/null
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/unsupported/p6spy/_index.en.md
@@ -0,0 +1,156 @@
++++
+title = "P6Spy"
+weight = 6
++++
+
+## Background Information
+
+ShardingSphere provides partial support for `com.p6spy.engine.spy.P6SpyDriver`
through the
+`org.apache.shardingsphere:shardingsphere-infra-database-p6spy` module.
+
+## Prerequisites
+
+To use P6Spy for MySQL Server data nodes in ShardingSphere's configuration
file,
+the possible Maven dependencies are as follows,
+
+```xml
+<dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc</artifactId>
+ <version>${shardingsphere.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>p6spy</groupId>
+ <artifactId>p6spy</artifactId>
+ <version>3.9.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.mysql</groupId>
+ <artifactId>mysql-connector-j</artifactId>
+ <version>9.1.0</version>
+ </dependency>
+</dependencies>
+```
+
+## Configuration Example
+
+### Start MySQL Server
+
+Write a Docker Compose file to start MySQL Server.
+
+```yaml
+services:
+ mysql:
+ image: mysql:9.1.0
+ environment:
+ MYSQL_ROOT_PASSWORD: example
+ volumes:
+ - ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
+ ports:
+ - "3306:3306"
+```
+
+The `./docker-entrypoint-initdb.d` folder contains the file `init.sh`, the
content is as follows,
+
+```shell
+#!/bin/bash
+set -e
+
+mysql -uroot -p"$MYSQL_ROOT_PASSWORD" <<EOSQL
+CREATE DATABASE demo_ds_0;
+CREATE DATABASE demo_ds_1;
+CREATE DATABASE demo_ds_2;
+EOSQL
+
+for i in "demo_ds_0" "demo_ds_1" "demo_ds_2"
+do
+mysql -uroot -p"$MYSQL_ROOT_PASSWORD" "$i" <<'EOSQL'
+CREATE TABLE IF NOT EXISTS t_order (
+ order_id BIGINT NOT NULL AUTO_INCREMENT,
+ order_type INT(11),
+ user_id INT NOT NULL,
+ address_id BIGINT NOT NULL,
+ status VARCHAR(50),
+ PRIMARY KEY (order_id)
+);
+EOSQL
+done
+```
+
+### Create ShardingSphere data source in business project
+
+After the business project introduces the dependencies involved in the
prerequisites,
+write the ShardingSphere data source configuration file `demo.yaml` on the
classpath of the business project.
+
+```yaml
+dataSources:
+ ds_0:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.p6spy.engine.spy.P6SpyDriver
+ jdbcUrl: jdbc:p6spy:mysql://localhost:3306/demo_ds_0?sslMode=REQUIRED
+ username: root
+ password: example
+ ds_1:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.p6spy.engine.spy.P6SpyDriver
+ jdbcUrl: jdbc:p6spy:mysql://localhost:3306/demo_ds_1?sslMode=REQUIRED
+ username: root
+ password: example
+ ds_2:
+ dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+ driverClassName: com.p6spy.engine.spy.P6SpyDriver
+ jdbcUrl: jdbc:p6spy:mysql://localhost:3306/demo_ds_2?sslMode=REQUIRED
+ username: root
+ password: example
+rules:
+- !SHARDING
+ tables:
+ t_order:
+ actualDataNodes:
+ keyGenerateStrategy:
+ column: order_id
+ keyGeneratorName: snowflake
+ defaultDatabaseStrategy:
+ standard:
+ shardingColumn: user_id
+ shardingAlgorithmName: inline
+ shardingAlgorithms:
+ inline:
+ type: INLINE
+ props:
+ algorithm-expression: ds_${user_id % 2}
+ keyGenerators:
+ snowflake:
+ type: SNOWFLAKE
+```
+
+### Enjoy integration
+
+Create a ShardingSphere data source to enjoy integration,
+
+```java
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+public class ExampleUtils {
+ void test() throws SQLException {
+ HikariConfig config = new HikariConfig();
+ config.setJdbcUrl("jdbc:shardingsphere:classpath:demo.yaml");
+
config.setDriverClassName("org.apache.shardingsphere.driver.ShardingSphereDriver");
+ try (HikariDataSource dataSource = new HikariDataSource(config);
+ Connection connection = dataSource.getConnection();
+ Statement statement = connection.createStatement()) {
+ statement.execute("INSERT INTO t_order (user_id, order_type,
address_id, status) VALUES (1, 1, 1, 'INSERT_TEST')");
+ statement.executeQuery("SELECT * FROM t_order");
+ statement.execute("alter table t_order delete where order_id=1");
+ }
+ }
+}
+```
+
+## Usage Limitations
+
+Currently only supports configuring P6Spy for MySQL JDBC Driver.
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.cn.md
index e8f4c48d265..425f0f0472d 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.cn.md
@@ -14,7 +14,7 @@ ShardingSphere Proxy 或 GraalVM Native Image 形态的
ShardingSphere Proxy Nat
1. 若用户采用混合部署架构使用 ShardingSphere JDBC,此情景不直接与 ShardingSphere Proxy 交互,因此与本文无关。
本文仅讨论业务项目不使用 ShardingSphere JDBC 的场景
2. Seata Client 只存在于 ShardingSphere Proxy 中,业务项目并不需要依赖 Seata Client
-3. 业务项目的 R2BDC DataSource 可以正常连接至开启 Seata 集成的 ShardingSphere Proxy
+3. 业务项目的 R2DBC DataSource 可以正常连接至开启 Seata 集成的 ShardingSphere Proxy
4. 对于开启 Seata 集成的 ShardingSphere Proxy,无法通过建立 `跨服务的事务传播` 的操作,
传播事务到其他使用 Seata 集成的 ShardingSphere Proxy 实例或其他使用 Seata
集成的微服务。用户如果有这种需求,应考虑为 ShardingSphere 提交 PR
5. ShardingSphere JDBC 对 Seata 的 TCC 模式建立的假设,在 ShardingSphere Proxy 上失效
@@ -361,34 +361,3 @@ public class ExampleUtils {
}
}
```
-
-## 使用限制
-
-### 针对 GraalVM Native Image 形态的 ShardingSphere Proxy Native
-
-对于 GraalVM Native Image 形态的 ShardingSphere Proxy Native,
-用户始终需要修改 ShardingSphere 源代码以添加 Seata Client 和 Seata 集成的 Maven 模块,并编译为 GraalVM
Native Image。
-GraalVM Native Image 形态的 ShardingSphere Proxy Native 无法识别额外添加的 JAR 文件。
-
-```xml
-<project>
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-transaction-base-seata-at</artifactId>
- <version>${shardingsphere.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.seata</groupId>
- <artifactId>seata-all</artifactId>
- <version>2.2.0</version>
- <exclusions>
- <exclusion>
- <groupId>org.antlr</groupId>
- <artifactId>antlr4-runtime</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-</project>
-```
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.en.md
index 9876c84742d..cac93bf05dc 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/optional-plugins/seata-at/_index.en.md
@@ -14,7 +14,7 @@ but there are some differences,
1. If the user uses ShardingSphere JDBC in a hybrid deployment architecture,
this scenario does not directly interact with ShardingSphere Proxy and is
therefore not relevant to this article.
This article only discusses the scenario where the business project does
not use ShardingSphere JDBC
2. Seata Client only exists in ShardingSphere Proxy, and the business project
does not need to rely on Seata Client
-3. The R2BDC DataSource of the business project can be normally connected to
the ShardingSphere Proxy with Seata integration turned on
+3. The R2DBC DataSource of the business project can be normally connected to
the ShardingSphere Proxy with Seata integration turned on
4. For ShardingSphere Proxy with Seata integration turned on, it is not
possible to establish a `transaction propagation across services` operation to
propagate transactions to other ShardingSphere Proxy instances using Seata
integration or other microservices using Seata integration.
If users have such needs, they should consider submitting a PR for
ShardingSphere
5. The assumptions made by ShardingSphere JDBC on Seata's TCC mode are invalid
on ShardingSphere Proxy
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
index 3b1a0f5267e..272a3b41fec 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
@@ -178,3 +178,32 @@ services:
用户需要关注尚未关闭的 https://github.com/oracle/graal/issues/8177 。
若用户期望在 ShardingSphere Proxy Native 下使用这类 Java Agent,则需要关注
https://github.com/oracle/graal/pull/8077 涉及的变动。
+
+## Seata AT 模式集成
+
+对于 GraalVM Native Image 形态的 ShardingSphere Proxy Native,
+用户始终需要修改 ShardingSphere 源代码以添加 Seata Client 和 Seata 集成的 Maven 模块,并编译为 GraalVM
Native Image。
+GraalVM Native Image 形态的 ShardingSphere Proxy Native 无法识别额外添加的 JAR 文件。
+
+```xml
+<project>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-transaction-base-seata-at</artifactId>
+ <version>${shardingsphere.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.seata</groupId>
+ <artifactId>seata-all</artifactId>
+ <version>2.2.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-runtime</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
+```
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
index 392407cf5f6..f03450ba001 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
@@ -185,3 +185,32 @@ For Java Agents such as `ShardingSphere Agent`, the
`native-image` component of
Users need to pay attention to https://github.com/oracle/graal/issues/8177
which has not been closed.
If users expect to use such Java Agents under ShardingSphere Proxy Native,
they need to pay attention to the changes involved in
https://github.com/oracle/graal/pull/8077 .
+
+## Seata AT mode integration
+
+For ShardingSphere Proxy Native in GraalVM Native Image,
+Users always need to modify the ShardingSphere source code to add the Seata
Client and Seata integrated Maven modules and compile them into GraalVM Native
Image.
+ShardingSphere Proxy Native in GraalVM Native Image cannot recognize the
additional JAR files.
+
+```xml
+<project>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-transaction-base-seata-at</artifactId>
+ <version>${shardingsphere.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.seata</groupId>
+ <artifactId>seata-all</artifactId>
+ <version>2.2.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-runtime</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
+```
diff --git
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
index dfa0c21e71f..4c06eb6ee0f 100644
---
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
+++
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
@@ -3,6 +3,10 @@
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"},
"name":"JdkLogger"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine"},
+ "name":"JdkLogger"
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader"},
"name":"[Lcom.fasterxml.jackson.databind.deser.BeanDeserializerModifier;"
@@ -24,7 +28,7 @@
"name":"[Lcom.github.dockerjava.api.model.VolumesFrom;"
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager$$Lambda/0x00007faf37e08000"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager$$Lambda/0x00007f30b7e11630"},
"name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;"
},
{
@@ -68,11 +72,11 @@
"name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;"
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.metadata.factory.ExternalMetaDataFactory"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.version.MetaDataVersionPersistService"},
"name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;"
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.service.version.MetaDataVersionPersistService"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder"},
"name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;"
},
{
@@ -87,6 +91,10 @@
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
"name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
+ "name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;"
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"},
"name":"[Ljava.lang.String;"
@@ -95,6 +103,10 @@
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.DatabaseTypeEngine"},
"name":"[Ljava.sql.Statement;"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.core.metadata.database.datatype.DataTypeRegistry"},
+ "name":"[Ljava.sql.Statement;"
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.mysql.checker.MySQLDatabasePrivilegeChecker"},
"name":"[Ljava.sql.Statement;"
@@ -103,6 +115,14 @@
"condition":{"typeReachable":"org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository"},
"name":"[Ljava.sql.Statement;"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
+ "name":"[Ljava.sql.Statement;"
+},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
+ "name":"[Ljava.sql.Statement;"
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.hive.metadata.data.loader.HiveMetaDataLoader"},
"name":"com.sun.security.auth.UnixPrincipal"
@@ -253,10 +273,6 @@
"name":"java.lang.ClassLoader",
"queryAllDeclaredMethods":true
},
-{
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
- "name":"java.lang.ClassLoader"
-},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"},
"name":"java.lang.Cloneable",
@@ -300,6 +316,11 @@
"condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"},
"name":"java.lang.Number"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor"},
+ "name":"java.lang.Object",
+ "allDeclaredFields":true
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.hive.metadata.data.loader.HiveMetaDataLoader"},
"name":"java.lang.Object",
@@ -356,7 +377,7 @@
"allDeclaredFields":true
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.StandaloneMetaDataManagerPersistService"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.service.StandaloneMetaDataManagerPersistService"},
"name":"java.lang.Object",
"allDeclaredFields":true
},
@@ -365,11 +386,6 @@
"name":"java.lang.Object",
"allDeclaredFields":true
},
-{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor"},
- "name":"java.lang.Object",
- "allDeclaredFields":true
-},
{
"condition":{"typeReachable":"org.apache.shardingsphere.sharding.rule.changed.DefaultDatabaseShardingStrategyChangedProcessor"},
"name":"java.lang.Object",
@@ -671,12 +687,12 @@
"name":"java.util.OptionalLong"
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor"},
"name":"java.util.Properties",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"},
"name":"java.util.Properties",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
@@ -733,6 +749,11 @@
"queryAllPublicConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] },
{"name":"add","parameterTypes":["long"] }, {"name":"sum","parameterTypes":[] }]
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask"},
+ "name":"java.util.concurrent.atomic.Striped64$Cell",
+ "fields":[{"name":"value"}]
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"},
"name":"java.util.function.DoubleFunction",
@@ -788,10 +809,6 @@
"name":"java.util.function.ToLongFunction",
"queryAllPublicMethods":true
},
-{
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
- "name":"java.util.logging.Logger"
-},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"},
"name":"java.util.regex.Matcher"
@@ -946,7 +963,7 @@
"allDeclaredFields":true
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.StandaloneMetaDataManagerPersistService"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.service.StandaloneMetaDataManagerPersistService"},
"name":"org.apache.shardingsphere.broadcast.yaml.config.YamlBroadcastRuleConfiguration",
"allDeclaredFields":true
},
@@ -1087,6 +1104,10 @@
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.DatabaseTypeEngine"},
"name":"org.apache.shardingsphere.driver.ShardingSphereDriver"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.core.metadata.database.datatype.DataTypeRegistry"},
+ "name":"org.apache.shardingsphere.driver.ShardingSphereDriver"
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.mysql.checker.MySQLDatabasePrivilegeChecker"},
"name":"org.apache.shardingsphere.driver.ShardingSphereDriver"
@@ -1096,8 +1117,12 @@
"name":"org.apache.shardingsphere.driver.ShardingSphereDriver"
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
-
"name":"org.apache.shardingsphere.driver.executor.engine.facade.standard.StandardDriverExecutorFacadeFactory"
+
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
+ "name":"org.apache.shardingsphere.driver.ShardingSphereDriver"
+},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
+ "name":"org.apache.shardingsphere.driver.ShardingSphereDriver"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"},
@@ -1307,29 +1332,29 @@
"name":"org.apache.shardingsphere.globalclock.yaml.config.YamlGlobalClockRuleConfigurationCustomizer"
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor"},
"name":"org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration",
"allDeclaredFields":true,
- "queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] },
{"name":"setProps","parameterTypes":["java.util.Properties"] },
{"name":"setType","parameterTypes":["java.lang.String"] }]
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.MetaDataPersistService"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"},
"name":"org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration",
"allDeclaredFields":true,
- "methods":[{"name":"getProps","parameterTypes":[] },
{"name":"getType","parameterTypes":[] }]
+ "queryAllPublicMethods":true,
+ "methods":[{"name":"<init>","parameterTypes":[] },
{"name":"setProps","parameterTypes":["java.util.Properties"] },
{"name":"setType","parameterTypes":["java.lang.String"] }]
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.StandaloneMetaDataManagerPersistService"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.metadata.persist.MetaDataPersistService"},
"name":"org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration",
"allDeclaredFields":true,
"methods":[{"name":"getProps","parameterTypes":[] },
{"name":"getType","parameterTypes":[] }]
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.service.StandaloneMetaDataManagerPersistService"},
"name":"org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration",
"allDeclaredFields":true,
- "methods":[{"name":"<init>","parameterTypes":[] },
{"name":"setProps","parameterTypes":["java.util.Properties"] },
{"name":"setType","parameterTypes":["java.lang.String"] }]
+ "methods":[{"name":"getProps","parameterTypes":[] },
{"name":"getType","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"},
@@ -1401,6 +1426,18 @@
"condition":{"typeReachable":"org.apache.shardingsphere.infra.props.TypedPropertyValue"},
"name":"org.apache.shardingsphere.infra.database.clickhouse.type.ClickHouseDatabaseType"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
+
"name":"org.apache.shardingsphere.infra.database.firebird.connector.FirebirdConnectionPropertiesParser"
+},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.core.type.DatabaseTypeRegistry"},
+
"name":"org.apache.shardingsphere.infra.database.firebird.metadata.database.FirebirdDatabaseMetaData"
+},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.props.TypedPropertyValue"},
+
"name":"org.apache.shardingsphere.infra.database.firebird.type.FirebirdDatabaseType"
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
"name":"org.apache.shardingsphere.infra.database.h2.checker.H2DatabasePrivilegeChecker"
@@ -1573,6 +1610,10 @@
"condition":{"typeReachable":"org.apache.shardingsphere.infra.props.TypedPropertyValue"},
"name":"org.apache.shardingsphere.infra.database.testcontainers.type.TcClickHouseDatabaseType"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.props.TypedPropertyValue"},
+
"name":"org.apache.shardingsphere.infra.database.testcontainers.type.TcFirebirdDatabaseType"
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.props.TypedPropertyValue"},
"name":"org.apache.shardingsphere.infra.database.testcontainers.type.TcMariaDBDatabaseType"
@@ -2066,83 +2107,88 @@
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"},
"name":"org.apache.shardingsphere.mask.yaml.config.rule.YamlMaskTableRuleConfigurationCustomizer"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
+ "name":"org.apache.shardingsphere.mode.event.deliver.DeliverEventSubscriber",
+ "queryAllDeclaredMethods":true
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"name":"org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.deliver.DeliverQualifiedDataSourceSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.DispatchEventSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.CacheEvictedSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.CacheEvictedSubscriber",
"queryAllDeclaredMethods":true,
"methods":[{"name":"cleanCache","parameterTypes":["org.apache.shardingsphere.mode.event.dispatch.DispatchEvent"]
}]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.ComputeNodeStateSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.ComputeNodeStateSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.DatabaseDataChangedSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.DatabaseDataChangedSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.GlobalRuleConfigurationEventSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.GlobalRuleConfigurationEventSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.ListenerAssistedSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.ListenerAssistedSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.MetaDataChangedSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.MetaDataChangedSubscriber",
"queryAllDeclaredMethods":true
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.listener.DatabaseMetaDataChangedListener$$Lambda/0x00007faf37cad3a8"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.MetaDataChangedSubscriber"
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.listener.type.DatabaseMetaDataChangedListener$$Lambda/0x00007f30b7cb7388"},
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.MetaDataChangedSubscriber"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.ProcessListChangedSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.ProcessListChangedSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.PropertiesEventSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.PropertiesEventSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.QualifiedDataSourceSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.QualifiedDataSourceSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.RuleItemChangedSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.RuleItemChangedSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.StateChangedSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.StateChangedSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.StorageUnitEventSubscriber",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.StorageUnitEventSubscriber",
"queryAllDeclaredMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.mode.persist.PersistServiceFacade"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.persist.ClusterPersistServiceBuilder",
+
"name":"org.apache.shardingsphere.mode.manager.cluster.persist.builder.ClusterPersistServiceBuilder",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
@@ -2155,7 +2201,7 @@
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.mode.persist.PersistServiceFacade"},
-
"name":"org.apache.shardingsphere.mode.manager.standalone.persist.StandalonePersistServiceBuilder",
+
"name":"org.apache.shardingsphere.mode.manager.standalone.persist.builder.StandalonePersistServiceBuilder",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
@@ -2454,6 +2500,15 @@
"condition":{"typeReachable":"org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPILoader"},
"name":"org.apache.shardingsphere.readwritesplitting.checker.ReadwriteSplittingRuleConfigurationChecker"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
+
"name":"org.apache.shardingsphere.readwritesplitting.cluster.ReadwriteSplittingQualifiedDataSourceDeletedSubscriber",
+ "queryAllDeclaredMethods":true
+},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder"},
+
"name":"org.apache.shardingsphere.readwritesplitting.cluster.ReadwriteSplittingQualifiedDataSourceDeletedSubscriber"
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
"name":"org.apache.shardingsphere.readwritesplitting.distsql.handler.update.AlterReadwriteSplittingRuleExecutor"
@@ -2990,7 +3045,7 @@
"allDeclaredFields":true
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.StandaloneMetaDataManagerPersistService"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.service.StandaloneMetaDataManagerPersistService"},
"name":"org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration",
"allDeclaredFields":true
},
@@ -3027,7 +3082,7 @@
"methods":[{"name":"getActualDataNodes","parameterTypes":[] },
{"name":"getAuditStrategy","parameterTypes":[] },
{"name":"getDatabaseStrategy","parameterTypes":[] },
{"name":"getKeyGenerateStrategy","parameterTypes":[] },
{"name":"getLogicTable","parameterTypes":[] },
{"name":"getTableStrategy","parameterTypes":[] }]
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.StandaloneMetaDataManagerPersistService"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.service.StandaloneMetaDataManagerPersistService"},
"name":"org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration",
"allDeclaredFields":true,
"methods":[{"name":"getActualDataNodes","parameterTypes":[] },
{"name":"getAuditStrategy","parameterTypes":[] },
{"name":"getDatabaseStrategy","parameterTypes":[] },
{"name":"getKeyGenerateStrategy","parameterTypes":[] },
{"name":"getLogicTable","parameterTypes":[] },
{"name":"getTableStrategy","parameterTypes":[] }]
@@ -3097,7 +3152,7 @@
"methods":[{"name":"getComplex","parameterTypes":[] },
{"name":"getHint","parameterTypes":[] }, {"name":"getNone","parameterTypes":[]
}, {"name":"getStandard","parameterTypes":[] }]
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.StandaloneMetaDataManagerPersistService"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.service.StandaloneMetaDataManagerPersistService"},
"name":"org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration",
"allDeclaredFields":true,
"methods":[{"name":"getComplex","parameterTypes":[] },
{"name":"getHint","parameterTypes":[] }, {"name":"getNone","parameterTypes":[]
}, {"name":"getStandard","parameterTypes":[] }]
@@ -3218,7 +3273,7 @@
"allDeclaredFields":true
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.StandaloneMetaDataManagerPersistService"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.persist.service.StandaloneMetaDataManagerPersistService"},
"name":"org.apache.shardingsphere.single.yaml.config.YamlSingleRuleConfiguration",
"allDeclaredFields":true
},
@@ -3246,6 +3301,11 @@
"condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.core.database.cache.ParseTreeCacheBuilder"},
"name":"org.apache.shardingsphere.sql.parser.core.database.cache.ParseTreeCacheLoader"
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.core.database.visitor.SQLStatementVisitorFactory"},
+
"name":"org.apache.shardingsphere.sql.parser.firebird.visitor.statement.FirebirdStatementVisitorFacade",
+ "methods":[{"name":"<init>","parameterTypes":[] }]
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.core.database.visitor.SQLStatementVisitorFactory"},
"name":"org.apache.shardingsphere.sql.parser.hive.visitor.statement.HiveStatementVisitorFacade",
@@ -3416,6 +3476,16 @@
"name":"org.apache.shardingsphere.sql.parser.statement.hive.dml.HiveSelectStatement",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
+
"name":"org.apache.shardingsphere.sql.parser.statement.mysql.ddl.MySQLCreateTableStatement",
+ "methods":[{"name":"<init>","parameterTypes":[] }]
+},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.handler.ProxyBackendHandlerFactory"},
+
"name":"org.apache.shardingsphere.sql.parser.statement.mysql.ddl.MySQLCreateTableStatement",
+ "methods":[{"name":"<init>","parameterTypes":[] }]
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.handler.ProxyBackendHandlerFactory"},
"name":"org.apache.shardingsphere.sql.parser.statement.mysql.dml.MySQLDeleteStatement",
@@ -3446,6 +3516,11 @@
"name":"org.apache.shardingsphere.sql.parser.statement.mysql.dml.MySQLSelectStatement",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
+
"name":"org.apache.shardingsphere.sql.parser.statement.opengauss.ddl.OpenGaussCreateTableStatement",
+ "methods":[{"name":"<init>","parameterTypes":[] }]
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"},
"name":"org.apache.shardingsphere.sql.parser.statement.opengauss.dml.OpenGaussInsertStatement",
@@ -3461,6 +3536,16 @@
"name":"org.apache.shardingsphere.sql.parser.statement.opengauss.dml.OpenGaussSelectStatement",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
+
"name":"org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLCreateTableStatement",
+ "methods":[{"name":"<init>","parameterTypes":[] }]
+},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.parse.PostgreSQLComParseExecutor"},
+
"name":"org.apache.shardingsphere.sql.parser.statement.postgresql.ddl.PostgreSQLCreateTableStatement",
+ "methods":[{"name":"<init>","parameterTypes":[] }]
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.parse.PostgreSQLComParseExecutor"},
"name":"org.apache.shardingsphere.sql.parser.statement.postgresql.dml.PostgreSQLDeleteStatement",
@@ -3491,6 +3576,11 @@
"name":"org.apache.shardingsphere.sql.parser.statement.postgresql.dml.PostgreSQLSelectStatement",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
+
"name":"org.apache.shardingsphere.sql.parser.statement.sqlserver.ddl.SQLServerCreateTableStatement",
+ "methods":[{"name":"<init>","parameterTypes":[] }]
+},
{
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"},
"name":"org.apache.shardingsphere.sql.parser.statement.sqlserver.dml.SQLServerInsertStatement",
diff --git
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
index ea846a4d398..6b0205ad0ab 100644
---
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
+++
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
@@ -3,9 +3,6 @@
"includes":[{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"},
"pattern":"\\QMETA-INF/dgminfo\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
- "pattern":"\\QMETA-INF/druid-driver.properties\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"},
"pattern":"\\QMETA-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule\\E"
@@ -21,9 +18,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/seata/io.seata.core.auth.AuthSigner\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
- "pattern":"\\QMETA-INF/seata/io.seata.core.context.ContextCore\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/seata/io.seata.core.model.ResourceManager\\E"
@@ -45,9 +39,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/seata/org.apache.seata.core.auth.AuthSigner\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
- "pattern":"\\QMETA-INF/seata/org.apache.seata.core.context.ContextCore\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/seata/org.apache.seata.core.model.ResourceManager\\E"
@@ -66,9 +57,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.connector.StandardDatabaseConnector"},
"pattern":"\\QMETA-INF/seata/org.apache.seata.rm.datasource.exec.InsertExecutor\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
-
"pattern":"\\QMETA-INF/seata/org.apache.seata.rm.datasource.undo.UndoLogManager\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.connector.StandardDatabaseConnector"},
"pattern":"\\QMETA-INF/seata/org.apache.seata.rm.datasource.undo.UndoLogParser\\E"
@@ -87,9 +75,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.connector.StandardDatabaseConnector"},
"pattern":"\\QMETA-INF/seata/org.apache.seata.sqlparser.struct.TableMetaCache\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
-
"pattern":"\\QMETA-INF/seata/org.apache.seata.sqlparser.util.DbTypeParser\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.xa.atomikos.manager.AtomikosTransactionManagerProvider"},
"pattern":"\\QMETA-INF/services/com.atomikos.icatch.TransactionServicePlugin\\E"
@@ -106,7 +91,7 @@
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager"},
"pattern":"\\QMETA-INF/services/com.clickhouse.client.ClickHouseClient\\E"
}, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager$$Lambda/0x00007faf37cb8640"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.connection.DriverDatabaseConnectionManager$$Lambda/0x00007f30b7cc6cb8"},
"pattern":"\\QMETA-INF/services/com.clickhouse.client.ClickHouseClient\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"},
@@ -123,9 +108,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/services/io.seata.core.auth.AuthSigner\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
- "pattern":"\\QMETA-INF/services/io.seata.core.context.ContextCore\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/services/io.seata.core.model.ResourceManager\\E"
@@ -180,9 +162,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/services/org.apache.seata.core.auth.AuthSigner\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
-
"pattern":"\\QMETA-INF/services/org.apache.seata.core.context.ContextCore\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/services/org.apache.seata.core.model.ResourceManager\\E"
@@ -201,9 +180,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.connector.StandardDatabaseConnector"},
"pattern":"\\QMETA-INF/services/org.apache.seata.rm.datasource.exec.InsertExecutor\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
-
"pattern":"\\QMETA-INF/services/org.apache.seata.rm.datasource.undo.UndoLogManager\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.connector.StandardDatabaseConnector"},
"pattern":"\\QMETA-INF/services/org.apache.seata.rm.datasource.undo.UndoLogParser\\E"
@@ -222,9 +198,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.connector.StandardDatabaseConnector"},
"pattern":"\\QMETA-INF/services/org.apache.seata.sqlparser.struct.TableMetaCache\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
-
"pattern":"\\QMETA-INF/services/org.apache.seata.sqlparser.util.DbTypeParser\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.authority.rule.AuthorityRule"},
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.authority.spi.PrivilegeProvider\\E"
@@ -246,9 +219,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.parse.PostgreSQLComParseExecutor"},
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.distsql.parser.engine.spi.DistSQLParserFacade\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"},
-
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.driver.executor.engine.facade.DriverExecutorFacadeFactory\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.infra.algorithm.keygen.core.KeyGenerateAlgorithm\\E"
@@ -298,7 +268,7 @@
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.infra.executor.checker.SQLExecutionChecker\\E"
}, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.Portal"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine"},
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.infra.executor.sql.hook.SQLExecutionHook\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.infra.executor.sql.prepare.AbstractExecutionPrepareEngine"},
@@ -351,6 +321,9 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.logging.spi.ShardingSphereLogBuilder\\E"
+ }, {
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder"},
+
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.mode.event.deliver.DeliverEventSubscriber\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.mode.manager.ContextManagerBuilder\\E"
@@ -474,9 +447,6 @@
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.xa.atomikos.manager.AtomikosTransactionManagerProvider"},
"pattern":"\\Qjta.properties\\E"
- }, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"},
- "pattern":"\\Qlib/sqlparser/druid.jar\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.infra.database.hive.metadata.data.loader.HiveMetaDataLoader"},
"pattern":"\\Qmapred-default.xml\\E"
diff --git
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
index 4597bf4a596..f6b28429413 100644
---
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
+++
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json
@@ -239,8 +239,8 @@
"allPublicMethods":true
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.infra.util.eventbus.EventBusContext"},
-
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.MetaDataChangedSubscriber",
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.listener.type.DatabaseMetaDataChangedListener"},
+
"name":"org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.type.MetaDataChangedSubscriber",
"allPublicMethods":true
},
{
diff --git a/pom.xml b/pom.xml
index b92b8d15cf1..8851b93a3b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -155,7 +155,7 @@
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
<dockerfile-maven.version>1.4.13</dockerfile-maven.version>
<os-detector-maven-plugin.version>0.3.1</os-detector-maven-plugin.version>
- <native-maven-plugin.version>0.10.3</native-maven-plugin.version>
+ <native-maven-plugin.version>0.10.4</native-maven-plugin.version>
<!-- Compile plugin versions -->
<templating-maven-plugin.version>1.0.0</templating-maven-plugin.version>
diff --git a/test/native/pom.xml b/test/native/pom.xml
index 61b583aabeb..ae1954a51d3 100644
--- a/test/native/pom.xml
+++ b/test/native/pom.xml
@@ -216,11 +216,6 @@
<artifactId>mssqlserver</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.testcontainers</groupId>
- <artifactId>clickhouse</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
index f54f3db5c5a..1b4863d2036 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
@@ -25,7 +25,6 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledInNativeImage;
-import org.testcontainers.clickhouse.ClickHouseContainer;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.Network;
import org.testcontainers.junit.jupiter.Container;
@@ -66,11 +65,12 @@ class ClickHouseTest {
.withNetworkAliases("clickhouse-keeper-01");
@Container
- public static final ClickHouseContainer CONTAINER = new
ClickHouseContainer("clickhouse/clickhouse-server:24.11.1.2557")
+ public static final GenericContainer<?> CONTAINER = new
GenericContainer<>("clickhouse/clickhouse-server:24.11.1.2557")
.withCopyFileToContainer(
MountableFile.forHostPath(Paths.get("src/test/resources/test-native/xml/transactions.xml").toAbsolutePath()),
"/etc/clickhouse-server/config.d/transactions.xml")
.withNetwork(NETWORK)
+ .withExposedPorts(8123)
.dependsOn(CLICKHOUSE_KEEPER_CONTAINER);
private static final String SYSTEM_PROP_KEY_PREFIX =
"fixture.test-native.yaml.database.clickhouse.";
@@ -102,18 +102,18 @@ class ClickHouseTest {
private Connection openConnection(final String databaseName) throws
SQLException {
Properties props = new Properties();
- props.setProperty("user", CONTAINER.getUsername());
- props.setProperty("password", CONTAINER.getPassword());
+ props.setProperty("user", "default");
+ props.setProperty("password", "");
return DriverManager.getConnection(jdbcUrlPrefix + databaseName,
props);
}
private DataSource createDataSource() throws SQLException {
Awaitility.await().atMost(Duration.ofMinutes(1L)).ignoreExceptions().until(()
-> {
- openConnection(CONTAINER.getDatabaseName()).close();
+ openConnection("default").close();
return true;
});
try (
- Connection connection =
openConnection(CONTAINER.getDatabaseName());
+ Connection connection = openConnection("default");
Statement statement = connection.createStatement()) {
statement.executeUpdate("CREATE DATABASE demo_ds_0");
statement.executeUpdate("CREATE DATABASE demo_ds_1");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/MySQLTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/MySQLTest.java
index 876c2659d2f..55e49ad0ceb 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/MySQLTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/MySQLTest.java
@@ -52,16 +52,11 @@ class MySQLTest {
private static final String SYSTEM_PROP_KEY_PREFIX =
"fixture.test-native.yaml.database.mysql.";
- private static final String USERNAME = "root";
-
- private static final String PASSWORD = "123456";
-
- private static final String DATABASE = "test";
+ private static final String PASSWORD = "example";
@SuppressWarnings("resource")
@Container
public static final GenericContainer<?> CONTAINER = new
GenericContainer<>("mysql:9.1.0-oraclelinux9")
- .withEnv("MYSQL_DATABASE", DATABASE)
.withEnv("MYSQL_ROOT_PASSWORD", PASSWORD)
.withExposedPorts(3306);
@@ -104,9 +99,9 @@ class MySQLTest {
private Connection openConnection() throws SQLException {
Properties props = new Properties();
- props.setProperty("user", USERNAME);
+ props.setProperty("user", "root");
props.setProperty("password", PASSWORD);
- return DriverManager.getConnection(jdbcUrlPrefix + DATABASE, props);
+ return DriverManager.getConnection(jdbcUrlPrefix, props);
}
@SuppressWarnings({"SqlDialectInspection", "SqlNoDataSourceInspection"})
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/OpenGaussTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/OpenGaussTest.java
index cd818a90145..81e0396a893 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/OpenGaussTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/OpenGaussTest.java
@@ -47,15 +47,11 @@ class OpenGaussTest {
private static final String SYSTEM_PROP_KEY_PREFIX =
"fixture.test-native.yaml.database.opengauss.";
- private static final String USERNAME = "gaussdb";
-
- private static final String PASSWORD = "openGauss@123";
-
- private static final String DATABASE = "postgres";
+ private static final String PASSWORD = "Enmo@123";
@SuppressWarnings("resource")
@Container
- public static final GenericContainer<?> CONTAINER = new
GenericContainer<>("opengauss/opengauss:5.0.0")
+ public static final GenericContainer<?> CONTAINER = new
GenericContainer<>("enmotech/opengauss-lite:5.1.0")
.withEnv("GS_PASSWORD", PASSWORD)
.withExposedPorts(5432);
@@ -98,9 +94,9 @@ class OpenGaussTest {
private Connection openConnection() throws SQLException {
Properties props = new Properties();
- props.setProperty("user", USERNAME);
+ props.setProperty("user", "gaussdb");
props.setProperty("password", PASSWORD);
- return DriverManager.getConnection(jdbcUrlPrefix + DATABASE, props);
+ return DriverManager.getConnection(jdbcUrlPrefix + "postgres", props);
}
@SuppressWarnings({"SqlDialectInspection", "SqlNoDataSourceInspection"})
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/ZookeeperServiceDiscoveryTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/ZookeeperServiceDiscoveryTest.java
index 9bcaf48dc3a..8123ef8a8a0 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/ZookeeperServiceDiscoveryTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/ZookeeperServiceDiscoveryTest.java
@@ -65,11 +65,10 @@ class ZookeeperServiceDiscoveryTest {
.withExposedPorts(2181);
/**
- * TODO Maybe we should be able to find a better solution than {@link
InstanceSpec#getRandomPort()} to use a random available port on the host.
- * It is not a good practice to use {@link FixedHostPortGenericContainer}.
- * See <a
href="https://github.com/testcontainers/testcontainers-java/issues/9553">testcontainers/testcontainers-java#9553</a>
.
+ * Due to the design flaw of testcontainers-java,
+ * starting HiveServer2 using Zookeeper service discovery can only be done
through the deprecated {@link FixedHostPortGenericContainer}.
+ * See <a
href="https://github.com/testcontainers/testcontainers-java/issues/9553">testcontainers/testcontainers-java#9553</a>.
*/
- @SuppressWarnings("unused")
@Container
private static final GenericContainer<?> HS2_1_CONTAINER = new
FixedHostPortGenericContainer<>("apache/hive:4.0.1")
.withNetwork(NETWORK)
@@ -105,11 +104,6 @@ class ZookeeperServiceDiscoveryTest {
System.clearProperty(SYSTEM_PROP_KEY_PREFIX + "ds2.jdbc-url");
}
- /**
- * TODO Same problem {@link InstanceSpec#getRandomPort()} as {@code
HIVE_SERVER2_1_CONTAINER}.
- *
- * @throws SQLException SQL exception.
- */
@Test
void assertShardingInLocalTransactions() throws SQLException {
jdbcUrlPrefix = "jdbc:hive2://" + ZOOKEEPER_CONTAINER.getHost() + ":"
+ ZOOKEEPER_CONTAINER.getMappedPort(2181) + "/";
diff --git
a/test/native/src/test/resources/test-native/yaml/jdbc/databases/mysql.yaml
b/test/native/src/test/resources/test-native/yaml/jdbc/databases/mysql.yaml
index 78a812a4f06..dfe0be55157 100644
--- a/test/native/src/test/resources/test-native/yaml/jdbc/databases/mysql.yaml
+++ b/test/native/src/test/resources/test-native/yaml/jdbc/databases/mysql.yaml
@@ -21,19 +21,19 @@ dataSources:
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: $${fixture.test-native.yaml.database.mysql.ds0.jdbc-url::}
username: root
- password: 123456
+ password: example
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: $${fixture.test-native.yaml.database.mysql.ds1.jdbc-url::}
username: root
- password: 123456
+ password: example
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: $${fixture.test-native.yaml.database.mysql.ds2.jdbc-url::}
username: root
- password: 123456
+ password: example
rules:
- !SHARDING
diff --git
a/test/native/src/test/resources/test-native/yaml/jdbc/databases/opengauss.yaml
b/test/native/src/test/resources/test-native/yaml/jdbc/databases/opengauss.yaml
index 38f5051da17..96290024a73 100644
---
a/test/native/src/test/resources/test-native/yaml/jdbc/databases/opengauss.yaml
+++
b/test/native/src/test/resources/test-native/yaml/jdbc/databases/opengauss.yaml
@@ -21,19 +21,19 @@ dataSources:
driverClassName: org.opengauss.Driver
jdbcUrl: $${fixture.test-native.yaml.database.opengauss.ds0.jdbc-url::}
username: gaussdb
- password: openGauss@123
+ password: Enmo@123
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.opengauss.Driver
jdbcUrl: $${fixture.test-native.yaml.database.opengauss.ds1.jdbc-url::}
username: gaussdb
- password: openGauss@123
+ password: Enmo@123
ds_2:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: org.opengauss.Driver
jdbcUrl: $${fixture.test-native.yaml.database.opengauss.ds2.jdbc-url::}
username: gaussdb
- password: openGauss@123
+ password: Enmo@123
rules:
- !SHARDING