Skip to content

Commit e3938e4

Browse files
authored
Remove support for DerbyNetworkServer and EmbeddedDerby (#37718)
1 parent 8f9a116 commit e3938e4

File tree

6 files changed

+4
-106
lines changed

6 files changed

+4
-106
lines changed

docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.cn.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,13 @@ Apache ShardingSphere 为不同的运行模式提供了不同的元数据持久
1111

1212
### 数据库持久化
1313

14-
`provider` 的可选值为 H2,MySQL,EmbeddedDerby,DerbyNetworkServer,HSQLDB。
14+
`provider` 的可选值为 H2,MySQLHSQLDB。
1515
由于第三方的 Vulnerability Report 时常误报 H2 Database,避免在 ShardingSphere Standalone Mode 使用 H2 Database 可能是一种选择。
1616
讨论 `provider` 不为默认值 `H2` 的情况。
1717

1818
1.`provider` 设置为 `MySQL`,则要求存在已就绪的 MySQL Server。classpath 应包含 `com.mysql:mysql-connector-j:9.0.0` 的 Maven 依赖。
19-
2.`provider` 设置为 `EmbeddedDerby`,则 Derby 数据库引擎将在与应用程序相同的 JVM 内运行。
20-
classpath 应包含 `org.apache.derby:derby:10.17.1.0``org.apache.derby:derbytools:10.17.1.0` 的 Maven 依赖,
21-
且要求编译或运行下游项目的 JDK 版本大于或等于 JDK19。可能的配置如下。
2219

23-
```yaml
24-
mode:
25-
type: Standalone
26-
repository:
27-
type: JDBC
28-
props:
29-
provider: EmbeddedDerby
30-
jdbc_url: jdbc:derby:memory:config;create=true
31-
username:
32-
```
33-
34-
3. 若 `provider` 设置为 `DerbyNetworkServer`,则要求存在已就绪的 Derby Network Server。
35-
Derby Network Server 不存在可用的 Docker Image,用户可能需要手动启动 Derby Network Server。
36-
classpath 应包含 `org.apache.derby:derbyclient:10.17.1.0` 和 `org.apache.derby:derbytools:10.17.1.0` 的 Maven 依赖,
37-
且要求编译或运行下游项目的 JDK 版本大于或等于 JDK19。
38-
4. 若 `provider` 设置为 `HSQLDB`,则要求存在已就绪的采用 Server Modes 的 HyperSQL,或以 in-process database 的方式创建数据库。
20+
2.`provider` 设置为 `HSQLDB`,则要求存在已就绪的采用 Server Modes 的 HyperSQL,或以 in-process database 的方式创建数据库。
3921
classpath 应包含 `classifier``jdk8``org.hsqldb:hsqldb:2.7.3` 的 Maven 依赖。
4022
采用 Server Modes 的 HyperSQL 不存在可用的 Docker Image,用户可能需要手动启动 Server Modes 的 HyperSQL。
4123
若使用 mem: protocol 的 HyperSQL,则可能的配置如下,

docs/document/content/user-manual/common-config/builtin-algorithm/metadata-repository.en.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,13 @@ Apache ShardingSphere provides different metadata persistence methods for differ
1111

1212
### Database Repository
1313

14-
The optional values of `provider` are H2, MySQL, EmbeddedDerby, DerbyNetworkServer and HSQLDB.
14+
The optional values of `provider` are H2, MySQL and HSQLDB.
1515
Since third-party Vulnerability Reports often misreport H2 Database, avoiding the use of H2 Database in ShardingSphere Standalone Mode may be an option.
1616
Discuss the case where `provider` is not the default value `H2`.
1717

1818
1. If `provider` is set to `MySQL`, a ready MySQL Server is required. The classpath should contain the Maven dependency of `com.mysql:mysql-connector-j:9.0.0`.
19-
2. If `provider` is set to `EmbeddedDerby`, the Derby database engine will run in the same JVM as the application.
20-
The classpath should contain Maven dependencies of `org.apache.derby:derby:10.17.1.0` and `org.apache.derby:derbytools:10.17.1.0`,
21-
and the JDK version required to compile or run the downstream project is greater than or equal to JDK19. Possible configurations are as follows.
2219

23-
```yaml
24-
mode:
25-
type: Standalone
26-
repository:
27-
type: JDBC
28-
props:
29-
provider: EmbeddedDerby
30-
jdbc_url: jdbc:derby:memory:config;create=true
31-
username:
32-
```
33-
34-
3. If `provider` is set to `DerbyNetworkServer`, a ready Derby Network Server is required.
35-
There is no available Docker Image for Derby Network Server, and users may need to start Derby Network Server manually.
36-
The classpath should contain Maven dependencies of `org.apache.derby:derbyclient:10.17.1.0` and `org.apache.derby:derbytools:10.17.1.0`,
37-
and the JDK version required to compile or run the downstream project is greater than or equal to JDK19.
38-
4. If `provider` is set to `HSQLDB`, a ready HyperSQL using Server Modes is required, or a database is created as an in-process database.
20+
2. If `provider` is set to `HSQLDB`, a ready HyperSQL using Server Modes is required, or a database is created as an in-process database.
3921
The classpath should contain the Maven dependency of `org.hsqldb:hsqldb:2.7.3` with `classifier` as `jdk8`.
4022
There is no available Docker Image for HyperSQL using Server Modes, and users may need to manually start HyperSQL using Server Modes.
4123
If HyperSQL using mem: protocol is used, the possible configuration is as follows,

infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reachability-metadata.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11598,18 +11598,6 @@
1159811598
},
1159911599
"glob": "sql"
1160011600
},
11601-
{
11602-
"condition": {
11603-
"typeReached": "org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader"
11604-
},
11605-
"glob": "sql/DerbyNetworkServer.xml"
11606-
},
11607-
{
11608-
"condition": {
11609-
"typeReached": "org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader"
11610-
},
11611-
"glob": "sql/EmbeddedDerby.xml"
11612-
},
1161311601
{
1161411602
"condition": {
1161511603
"typeReached": "org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader"

mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/DerbyNetworkServer.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

mode/type/standalone/repository/provider/jdbc/src/main/resources/sql/EmbeddedDerby.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

mode/type/standalone/repository/provider/jdbc/src/test/java/org/apache/shardingsphere/mode/repository/standalone/jdbc/sql/JDBCRepositorySQLLoaderTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class JDBCRepositorySQLLoaderTest {
2727
@Test
2828
void assertLoad() {
2929
assertThat(JDBCRepositorySQLLoader.load("MySQL").getType(), is("MySQL"));
30-
assertThat(JDBCRepositorySQLLoader.load("EmbeddedDerby").getType(), is("EmbeddedDerby"));
31-
assertThat(JDBCRepositorySQLLoader.load("DerbyNetworkServer").getType(), is("DerbyNetworkServer"));
3230
assertThat(JDBCRepositorySQLLoader.load("HSQLDB").getType(), is("HSQLDB"));
3331
}
3432

0 commit comments

Comments
 (0)