Skip to content

Commit

Permalink
Merge branch 'apache:master' into ISSUE_31437_WITH_KEYWORD_QUERY_ERRO…
Browse files Browse the repository at this point in the history
…R_MYSQL
  • Loading branch information
Yash-cor authored Jan 2, 2025
2 parents aa99360 + a6a09ba commit 03cc31d
Show file tree
Hide file tree
Showing 111 changed files with 1,524 additions and 3,922 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
1. Pipeline: Use case-insensitive identifiers to enhance the table metadata loader
1. Pipeline: Support primary key columns ordering for standard pipeline table metadata loader
1. Sharding: Optimize sharding table index name rewriting rules and remove unnecessary suffix rewriting - [#31171](https://github.com/apache/shardingsphere/issues/31171)
1. Metadata: Support postgresql and opengauss CHARACTER VARYING type metadata load - [#34221](https://github.com/apache/shardingsphere/pull/34221)

### Bug Fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ After performing the same access test as before, we can view dependencies throug

## Sampling Rate

The Observability plugin also enables users to set differnt sampling rate configured to suit different scenarios. Zipkin plugins support various sampling rate type configurations including const, counting, rate limiting, and boundary.
The Observability plugin also enables users to set different sampling rate configured to suit different scenarios. Zipkin plugins support various sampling rate type configurations including const, counting, rate limiting, and boundary.

For scenarios with a high volume of requests, we suggest you to choose the boundary type and configure it with the appropriate sampling rate to reduce the collect volume of tracing data.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This means it can effectively solve problems caused by increasing data volume in
## Conclusion
Apache ShardingSphere and openGauss can seek potential cooperation opportunities.

Considering the increasingly diversified applicaiton scenarios and increasing data volume, the requirements for database performance are at an all time high and will only continue to increase in the future.
Considering the increasingly diversified application scenarios and increasing data volume, the requirements for database performance are at an all time high and will only continue to increase in the future.

The success of our two communities cooperation is just the beginning of ourtwo communities building a collaborative database ecosystem.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Apache ShardingSphere currently only supports federated queries between homogene
## Conclusion
The Apache ShardingSphere community has been active in open source for 7 years. Through perseverance, the community has become mature we’d like to extend our sincere welcome to any devs or contributors who are enthusiastic about open source and coding to collaborate with us.

Among our recent achievements we’re particulary proud of, Apache ShardingSphere’s pluggable architecture and data sharding philosophy have been recognized by the academic community. [The paper, Apache ShardingSphere: A Holistic and Pluggable Platform for Data Sharding, has been published at this year’s ICDE, a top conference in the database field.](https://faun.pub/a-holistic-pluggable-platform-for-data-sharding-icde-2022-understanding-apache-shardingsphere-55779cfde16)
Among our recent achievements we’re particularly proud of, Apache ShardingSphere’s pluggable architecture and data sharding philosophy have been recognized by the academic community. [The paper, Apache ShardingSphere: A Holistic and Pluggable Platform for Data Sharding, has been published at this year’s ICDE, a top conference in the database field.](https://faun.pub/a-holistic-pluggable-platform-for-data-sharding-icde-2022-understanding-apache-shardingsphere-55779cfde16)

## Author

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Database Mesh 2.0 focuses on how to achieve the following goals in a cloud nativ

> **Developer experience**
As mentioned above, business developers are mainly concerned about business logic and implementation instead of infrastructure, operation and maintenance features. Developement experience will move towards [Serverless](https://www.redhat.com/en/topics/cloud-native-apps/what-is-serverless), which means it will become more and more transparent and intuitive when accessing databases. Developers only need to understand the type of data storage required by their business, and then use preset or dynamic ID credential information to access corresponding database services.
As mentioned above, business developers are mainly concerned about business logic and implementation instead of infrastructure, operation and maintenance features. Development experience will move towards [Serverless](https://www.redhat.com/en/topics/cloud-native-apps/what-is-serverless), which means it will become more and more transparent and intuitive when accessing databases. Developers only need to understand the type of data storage required by their business, and then use preset or dynamic ID credential information to access corresponding database services.

> **Programmable**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The data generated from test user order creation will be routed to shadow databa

As mentioned in the introduction, full-link online stress testing is a complicated task that requires collaboration between microservices and middlewares to meet the needs of different traffic and stress testing tag transmissions.

Additonally, the testing service should be stateless and immediately available. [CyborgFlow](https://github.com/SphereEx/CyborgFlow), which is jointly maintained by Apache ShardingSphere, Apache APISIX and Apache SkyWalking provides out-of-the-box (OoTB) solution to run load test in your online system.
Additionally, the testing service should be stateless and immediately available. [CyborgFlow](https://github.com/SphereEx/CyborgFlow), which is jointly maintained by Apache ShardingSphere, Apache APISIX and Apache SkyWalking provides out-of-the-box (OoTB) solution to run load test in your online system.

[Apache APISIX](https://apisix.apache.org/) is responsible for making tags on testing data at the gateway layer, while [Apache SkyWalking](https://skywalking.apache.org/) is responsible for transmission through the whole scheduling link, and finally, Apache ShardingSphere-Proxy will isolate data and route testing data to the shadow database.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Input command

Output

a. If sucessful, show "Query OK, 0 rows affected";
a. If successful, show "Query OK, 0 rows affected";
b. Re-execute `show readwrite_splitting hint status`; show the ource is changed into Write;
c. Execute `preview select * from t_order`and see the queried SQL will go to the master database.

Expand Down
2 changes: 1 addition & 1 deletion docs/document/content/overview/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ShardingSphere offers a flat learning curve to DBAs and is interaction-friendly

It can provide enhancement capability based on mature databases while ensuring security and stability.

- Elastic Extention
- Elastic Extension

It supports computing, storage, and smooth online expansion, which can meet diverse business needs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public Map<String, Integer> getExtraDataTypes() {
result.put("NUMERIC", Types.NUMERIC);
result.put("REAL", Types.REAL);
result.put("BOOL", Types.BOOLEAN);
result.put("CHARACTER VARYING", Types.VARCHAR);
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public Map<String, Integer> getExtraDataTypes() {
result.put("NUMERIC", Types.NUMERIC);
result.put("REAL", Types.REAL);
result.put("BOOL", Types.BOOLEAN);
result.put("CHARACTER VARYING", Types.VARCHAR);
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.LinkedList;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;

/**
* Database rule configuration manager.
Expand Down Expand Up @@ -74,7 +75,7 @@ public synchronized void alterRuleConfiguration(final String databaseName, final
rules.removeIf(each -> each.getConfiguration().getClass().isAssignableFrom(ruleConfig.getClass()));
rules.addAll(DatabaseRulesBuilder.build(
databaseName, database.getProtocolType(), database.getRuleMetaData().getRules(), ruleConfig, computeNodeInstanceContext, database.getResourceMetaData()));
refreshMetadata(databaseName, database, rules);
refreshMetadata(databaseName, getRuleConfigurations(rules));
}

/**
Expand All @@ -98,14 +99,16 @@ public synchronized void dropRuleConfiguration(final String databaseName, final
rules.addAll(DatabaseRulesBuilder.build(
databaseName, database.getProtocolType(), database.getRuleMetaData().getRules(), ruleConfig, computeNodeInstanceContext, database.getResourceMetaData()));
}
refreshMetadata(databaseName, database, rules);
refreshMetadata(databaseName, getRuleConfigurations(rules));
}

private void refreshMetadata(final String databaseName, final ShardingSphereDatabase database, final Collection<ShardingSphereRule> rules) throws SQLException {
database.getRuleMetaData().getRules().clear();
database.getRuleMetaData().getRules().addAll(rules);
private void refreshMetadata(final String databaseName, final Collection<RuleConfiguration> ruleConfigurations) throws SQLException {
MetaDataContexts reloadMetaDataContexts = MetaDataContextsFactory.createByAlterRule(databaseName, false,
database.getRuleMetaData().getConfigurations(), metaDataContexts.get(), metaDataPersistService, computeNodeInstanceContext);
ruleConfigurations, metaDataContexts.get(), metaDataPersistService, computeNodeInstanceContext);
metaDataContexts.set(reloadMetaDataContexts);
}

private Collection<RuleConfiguration> getRuleConfigurations(final Collection<ShardingSphereRule> rules) {
return rules.stream().map(ShardingSphereRule::getConfiguration).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
import org.apache.shardingsphere.infra.executor.kernel.thread.ExecutorThreadFactoryBuilder;
import org.apache.shardingsphere.infra.instance.metadata.InstanceType;
import org.apache.shardingsphere.infra.lock.LockContext;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
Expand Down Expand Up @@ -68,7 +69,9 @@ public ShardingSphereStatisticsRefreshEngine(final ContextManager contextManager
* Async refresh.
*/
public void asyncRefresh() {
EXECUTOR_SERVICE.execute(this::refresh);
if (InstanceType.PROXY == contextManager.getComputeNodeInstanceContext().getInstance().getMetaData().getType()) {
EXECUTOR_SERVICE.execute(this::refresh);
}
}

/**
Expand Down
Loading

0 comments on commit 03cc31d

Please sign in to comment.