Skip to content

Commit b51d95b

Browse files
committed
Merge remote-tracking branch 'upstream/master' into Issue#32280_bugfix_on_conflict_for_postgres
2 parents 5e225c4 + 3540168 commit b51d95b

File tree

765 files changed

+9887
-7908
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

765 files changed

+9887
-7908
lines changed

.github/workflows/nightly-e2e-agent.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
if: github.repository == 'apache/shardingsphere'
8080
needs: [ global-environment, build-e2e-image ]
8181
runs-on: ubuntu-latest
82-
timeout-minutes: 15
82+
timeout-minutes: 40
8383
strategy:
8484
max-parallel: 20
8585
fail-fast: false

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Apache ShardingSphere
2-
Copyright 2018-2024 The Apache Software Foundation
2+
Copyright 2018-2025 The Apache Software Foundation
33

44
This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ We deeply appreciate [community contributors](https://shardingsphere.apache.org/
114114

115115
<hr>
116116

117-
:white_check_mark: Version 5.5.1: released :tada:
117+
:white_check_mark: Version 5.5.2: released :tada:
118118

119119
🔗 For the release notes, follow this link to the relevant [GitHub page](https://github.com/apache/shardingsphere/blob/master/RELEASE-NOTES.md).
120120

121-
:soon: Version 5.5.2
121+
:soon: Version 5.5.3
122122

123-
We are currently working towards our 5.5.2 milestone.
123+
We are currently working towards our 5.5.3 milestone.
124124
Keep an eye on the [milestones page](https://github.com/apache/shardingsphere/milestones) of this repo to stay up to date.
125125

126126
[comment]: <> (##)

README_ZH.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ ShardingSphere 已于 2020 年 4 月 16 日成为 [Apache 软件基金会](https
108108

109109
<hr>
110110

111-
:white_check_mark: Version 5.5.1: 已发布 :tada:
111+
:white_check_mark: Version 5.5.2: 已发布 :tada:
112112

113113
🔗 请访问 [发布说明](https://github.com/apache/shardingsphere/blob/master/RELEASE-NOTES.md) 获得更详细的信息.
114114

115-
:soon: Version 5.5.2
115+
:soon: Version 5.5.3
116116

117-
我们目前正在开发 5.5.2 里程碑。
117+
我们目前正在开发 5.5.3 里程碑。
118118
请访问[里程碑](https://github.com/apache/shardingsphere/milestones) 获取最新信息。
119119

120120
##

RELEASE-NOTES.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
## Release 5.5.2-SNAPSHOT
1+
## Release 5.5.3-SNAPSHOT
2+
3+
### API Changes
4+
5+
### New Features
6+
7+
### Enhancements
8+
9+
1. Metadata: Add support for partition tables in PostgreSQL [#34346](https://github.com/apache/shardingsphere/pull/34346)
10+
1. SQL Binder: Support select aggregation function sql bind in projection and having - [#34379](https://github.com/apache/shardingsphere/pull/34379)
11+
1. Proxy Native: Add GraalVM Reachability Metadata and corresponding nativeTest for Firebird - [#34307](https://github.com/apache/shardingsphere/pull/34307)
12+
1. Infra: Support for connecting to Presto's Memory Connector in ShardingSphere config - [#34432](https://github.com/apache/shardingsphere/pull/34432)
13+
14+
### Bug Fixes
15+
16+
### Change Logs
17+
18+
1. [MILESTONE](https://github.com/apache/shardingsphere/milestone/31)
19+
20+
## Release 5.5.2
221

322
### API Changes
423

@@ -20,6 +39,7 @@
2039
1. SQL Parser: Support parsing Doris STRRIGHT - [#33393](https://github.com/apache/shardingsphere/pull/33393)
2140
1. SQL Parser: Support parsing MySQL by adding non-reserved keywords in BaseRule.g4 file according to MySQL 8.4 doc - [#33846](https://github.com/apache/shardingsphere/pull/33846)
2241
1. SQL Parser: Support parsing Doris EXTRACT\_URL\_PARAMETER - [#33571](https://github.com/apache/shardingsphere/pull/33571)
42+
1. SQL Parser: Enhance create view, alter view, drop view sql parser - [#34283](https://github.com/apache/shardingsphere/pull/34283)
2343
1. SQL Binder: Add sql bind logic for create table statement - [#34074](https://github.com/apache/shardingsphere/pull/34074)
2444
1. SQL Binder: Support create index statement sql bind - [#34112](https://github.com/apache/shardingsphere/pull/34112)
2545
1. SQL Parser: Support MySQL update with statement parse - [#34126](https://github.com/apache/shardingsphere/pull/34126)
@@ -32,6 +52,10 @@
3252
1. SQL Binder: Support truncate table sql bind and add test case - [#34162](https://github.com/apache/shardingsphere/pull/34162)
3353
1. SQL Binder: Support create view, alter view, drop view sql bind logic - [#34167](https://github.com/apache/shardingsphere/pull/34167)
3454
1. SQL Binder: Support load data and load xml sql bind and add test case - [#34177](https://github.com/apache/shardingsphere/pull/34177)
55+
1. SQL Binder: Support optimize table sql bind and add test case - [#34242](https://github.com/apache/shardingsphere/pull/34242)
56+
1. SQL Binder: Support show create table, show columns, show index statement bind - [#34271](https://github.com/apache/shardingsphere/pull/34271)
57+
1. SQL Binder: Support deny user sql bind and add test case - [#34279](https://github.com/apache/shardingsphere/pull/34279)
58+
1. SQL Binder: Support with segment bind check with UniqueCommonTableExpressionException - [#34163](https://github.com/apache/shardingsphere/pull/34163)
3559
1. Storage: Support setting `hive_conf_list`, `hive_var_list` and `sess_var_list` for jdbcURL when connecting to HiveServer2 - [#33749](https://github.com/apache/shardingsphere/pull/33749)
3660
1. Storage: Support connecting to HiveServer2 through database connection pools other than HikariCP - [#33762](https://github.com/apache/shardingsphere/pull/33762)
3761
1. Storage: Partial support for connecting to embedded ClickHouse `chDB` - [#33786](https://github.com/apache/shardingsphere/pull/33786)
@@ -50,8 +74,7 @@
5074
1. Agent: Simplify the use of Agent's Docker Image - [#33356](https://github.com/apache/shardingsphere/pull/33356)
5175
1. Mode: Support modifying Hikari-CP configurations via props in standalone mode [#34185](https://github.com/apache/shardingsphere/pull/34185)
5276
1. Encrypt: Support insert statement rewrite use quote [#34259](https://github.com/apache/shardingsphere/pull/34259)
53-
1. SQL Binder: Support optimize table sql bind and add test case - [#34242](https://github.com/apache/shardingsphere/pull/34242)
54-
1. SQL Binder: Support show create table, show columns, show index statement bind - [#34271](https://github.com/apache/shardingsphere/pull/34271)
77+
1. Infra: Support connecting to Firebird via jdbcUrl containing the absolute path to fdb - [#34335](https://github.com/apache/shardingsphere/pull/34335)
5578

5679
### Bug Fixes
5780

@@ -68,6 +91,7 @@
6891
1. Proxy: Fixes BatchUpdateException when execute INSERT INTO ON DUPLICATE KEY UPDATE in proxy adapter - [#33796](https://github.com/apache/shardingsphere/pull/33796)
6992
1. Proxy: Fixes "ALL PRIVILEGES ON `DB`.*" is not recognized during SELECT privilege verification for MySQL - [#34037](https://github.com/apache/shardingsphere/pull/34037)
7093
1. Proxy: Fixes MySQL longblob wrong column type returned by proxy protocol - [#34121](https://github.com/apache/shardingsphere/pull/34121)
94+
1. Proxy: Fixes MySQL proxy error if insert SQL contains more parameters not in insert values syntax - [#34287](https://github.com/apache/shardingsphere/pull/34287)
7195
1. Sharding: Remove ShardingRouteAlgorithmException check logic temporarily to support different actual table name configuration - [#33367](https://github.com/apache/shardingsphere/pull/33367)
7296
1. Sharding: Fixes SQL COUNT with GROUP BY to prevent incorrect row returns - [#33380](https://github.com/apache/shardingsphere/pull/33380)
7397
1. Sharding: Fixes avg, sum, min, max function return empty data when no query result return - [#33449](https://github.com/apache/shardingsphere/pull/33449)

agent/plugins/logging/type/file/src/main/java/org/apache/shardingsphere/agent/plugin/logging/file/advice/MetaDataContextsFactoryAdvice.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,25 @@
1919

2020
import lombok.extern.slf4j.Slf4j;
2121
import org.apache.shardingsphere.agent.api.advice.TargetAdviceMethod;
22-
import org.apache.shardingsphere.agent.plugin.core.advice.AbstractStaticMethodAdvice;
22+
import org.apache.shardingsphere.agent.api.advice.TargetAdviceObject;
23+
import org.apache.shardingsphere.agent.plugin.core.advice.AbstractInstanceMethodAdvice;
2324
import org.apache.shardingsphere.agent.plugin.core.recorder.MethodTimeRecorder;
2425

2526
/**
2627
* Meta data contexts factory advice.
2728
*/
2829
@Slf4j
29-
public final class MetaDataContextsFactoryAdvice extends AbstractStaticMethodAdvice {
30+
public final class MetaDataContextsFactoryAdvice extends AbstractInstanceMethodAdvice {
3031

3132
private final MethodTimeRecorder methodTimeRecorder = new MethodTimeRecorder(MetaDataContextsFactoryAdvice.class);
3233

3334
@Override
34-
public void beforeMethod(final Class<?> clazz, final TargetAdviceMethod method, final Object[] args, final String pluginType) {
35+
public void beforeMethod(final TargetAdviceObject target, final TargetAdviceMethod method, final Object[] args, final String pluginType) {
3536
methodTimeRecorder.recordNow(method);
3637
}
3738

3839
@Override
39-
public void afterMethod(final Class<?> clazz, final TargetAdviceMethod method, final Object[] args, final Object result, final String pluginType) {
40+
public void afterMethod(final TargetAdviceObject target, final TargetAdviceMethod method, final Object[] args, final Object result, final String pluginType) {
4041
log.info("Build meta data contexts finished, cost {} milliseconds.", methodTimeRecorder.getElapsedTimeAndClean(method));
4142
}
4243
}

agent/plugins/logging/type/file/src/main/resources/META-INF/conf/file-advisors.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@
1616
#
1717

1818
advisors:
19-
- target: org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory
19+
- target: org.apache.shardingsphere.mode.metadata.factory.MetaDataContextsFactory
2020
advice: org.apache.shardingsphere.agent.plugin.logging.file.advice.MetaDataContextsFactoryAdvice
2121
pointcuts:
2222
- name: create
2323
type: method
2424
params:
2525
- index: 0
26-
type: org.apache.shardingsphere.metadata.persist.MetaDataPersistService
27-
- index: 1
2826
type: org.apache.shardingsphere.mode.manager.ContextManagerBuilderParameter
29-
- index: 2
30-
type: org.apache.shardingsphere.infra.instance.ComputeNodeInstanceContext

agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporterTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
2828
import org.apache.shardingsphere.infra.metadata.database.resource.ResourceMetaData;
2929
import org.apache.shardingsphere.infra.metadata.database.resource.unit.StorageUnit;
30+
import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereStatistics;
31+
import org.apache.shardingsphere.infra.metadata.statistics.builder.ShardingSphereStatisticsFactory;
3032
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
31-
import org.apache.shardingsphere.metadata.persist.MetaDataPersistService;
3233
import org.apache.shardingsphere.mode.manager.ContextManager;
3334
import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
34-
import org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory;
3535
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
3636
import org.apache.shardingsphere.test.mock.AutoMockExtension;
3737
import org.apache.shardingsphere.test.mock.StaticMockSettings;
@@ -82,7 +82,7 @@ private ContextManager mockContextManager() {
8282
when(database.getProtocolType()).thenReturn(TypedSPILoader.getService(DatabaseType.class, "FIXTURE"));
8383
ShardingSphereMetaData metaData = mock(ShardingSphereMetaData.class);
8484
when(metaData.getAllDatabases()).thenReturn(Collections.singleton(database));
85-
MetaDataContexts metaDataContexts = MetaDataContextsFactory.create(mock(MetaDataPersistService.class), metaData);
85+
MetaDataContexts metaDataContexts = new MetaDataContexts(metaData, ShardingSphereStatisticsFactory.create(metaData, new ShardingSphereStatistics()));
8686
ContextManager result = mock(ContextManager.class, RETURNS_DEEP_STUBS);
8787
when(result.getMetaDataContexts()).thenReturn(metaDataContexts);
8888
return result;

agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyStateExporterTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@
2323
import org.apache.shardingsphere.agent.plugin.metrics.core.config.MetricConfiguration;
2424
import org.apache.shardingsphere.agent.plugin.metrics.core.fixture.collector.MetricsCollectorFixture;
2525
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
26+
import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereStatistics;
2627
import org.apache.shardingsphere.infra.state.instance.InstanceStateContext;
27-
import org.apache.shardingsphere.metadata.persist.MetaDataPersistService;
2828
import org.apache.shardingsphere.mode.manager.ContextManager;
2929
import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
30-
import org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory;
3130
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
3231
import org.apache.shardingsphere.test.mock.AutoMockExtension;
3332
import org.apache.shardingsphere.test.mock.StaticMockSettings;
@@ -73,7 +72,8 @@ void assertExportWithContextManager() {
7372
}
7473

7574
private ContextManager mockContextManager() {
76-
MetaDataContexts metaDataContexts = MetaDataContextsFactory.create(mock(MetaDataPersistService.class), new ShardingSphereMetaData());
75+
ShardingSphereMetaData metaData = new ShardingSphereMetaData();
76+
MetaDataContexts metaDataContexts = new MetaDataContexts(metaData, new ShardingSphereStatistics());
7777
ContextManager result = mock(ContextManager.class, RETURNS_DEEP_STUBS);
7878
when(result.getMetaDataContexts()).thenReturn(metaDataContexts);
7979
return result;

agent/plugins/metrics/type/prometheus/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/prometheus/PrometheusPluginLifecycleServiceTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@
2424
import org.apache.shardingsphere.infra.instance.metadata.InstanceMetaData;
2525
import org.apache.shardingsphere.infra.lock.LockContext;
2626
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
27+
import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereStatistics;
2728
import org.apache.shardingsphere.infra.util.eventbus.EventBusContext;
28-
import org.apache.shardingsphere.metadata.persist.MetaDataPersistService;
2929
import org.apache.shardingsphere.mode.manager.ContextManager;
3030
import org.apache.shardingsphere.mode.manager.standalone.workerid.StandaloneWorkerIdGenerator;
3131
import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
32-
import org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory;
33-
import org.apache.shardingsphere.mode.spi.PersistRepository;
32+
import org.apache.shardingsphere.mode.spi.repository.PersistRepository;
3433
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
3534
import org.apache.shardingsphere.test.mock.AutoMockExtension;
3635
import org.apache.shardingsphere.test.mock.StaticMockSettings;
@@ -70,7 +69,8 @@ void assertStart() throws IOException {
7069
}
7170

7271
private ContextManager mockContextManager() {
73-
MetaDataContexts metaDataContexts = MetaDataContextsFactory.create(mock(MetaDataPersistService.class), new ShardingSphereMetaData());
72+
ShardingSphereMetaData metaData = new ShardingSphereMetaData();
73+
MetaDataContexts metaDataContexts = new MetaDataContexts(metaData, new ShardingSphereStatistics());
7474
ComputeNodeInstanceContext computeNodeInstanceContext = new ComputeNodeInstanceContext(
7575
new ComputeNodeInstance(mock(InstanceMetaData.class)), new ModeConfiguration("Standalone", null), new EventBusContext());
7676
computeNodeInstanceContext.init(new StandaloneWorkerIdGenerator(), mock(LockContext.class));

0 commit comments

Comments
 (0)