Apache ShardingSphere 5.1.1 Is Available · ShardingSphere - Blog

Apache ShardingSphere 5.1.1 Is Available

Image description

In less than two months since the release of Apache ShardingSphere 5.1.0, our community has merged 698 PRs from teams or individuals around the world to bring you the new 5.1.1 release. This release has a number of optimizations in terms of features, performance, testing, documentation, examples and more.

The performance aspect deserves special mention, as we adopt the industry-standard TPC-C test model to run Apache ShardingSphere 5.1.1 and the openGauss 3.0 database on 16 physical servers, achieving over 10 million tpmC, the best performance in the industry at the same scale!

This article is an overview of the ShardingSphere 5.1.1 update.

Apache ShardingSphere 5.1.1 update optimizes the functionality and performance of 5.1.0, and fixes some issues. The following will give you a general overview of some of the updates.

Kernel

The kernel is ShardingSphere’s foundation, and it remains our goal to build a fully functional and stable kernel with high performance. In 5.1.1, ShardingSphere optimizes a lot of logic at the kernel level, fixing the problems found in different scenarios in the previous version, including data sharding, read/write splitting, data encryption, and improved the performance of each scenario to varying degrees.

In terms of database dialects, the kernel improves the support for MySQL tablespaces and improves SQL support for Oracle, SQL Server, PostgreSQL, openGauss, and other databases. Additionally, the initial support for PostgreSQL / openGauss schema, a three-tier structure, has been implemented in the ShardingSphere kernel and will be improved with the future releases.

Interface

This update fixes a potential performance risk for ShardingSphere-JDBC, optimizes the non-essential interaction logic between internal ShardingSphere-JDBC and the database connection pool, and reduces the performance overhead of ShardingSphere-JDBC.

In terms of ShardingSphere-Proxy, support for MySQL / PostgreSQL data types has been improved. The occasional ResultSet closed error for ShardingSphere-Proxy MySQL has been fixed, and ShardingSphere-Proxy MySQL also has initial support for executing multiple statements at the protocol level to improve the performance of batch operations.

In terms of client support, ShardingSphere-Proxy PostgreSQL improves the support for PostgreSQL JDBC Driver 42.3.x, and ShardingSphere-Proxy openGauss improves the support for openGauss JDBC Driver 3.0.

Elastic Scale-out

In this update, in addition to fixing the problem that migration tasks cannot be restarted by DistSQL after reporting errors, the elastic scaling has been improved and new features of stop source writing, resume source writing, and partial tables scaling have been implemented. For cases that do not meet the migration conditions, elastic scale-out can fail quickly and find out the problem in time to avoid extra time costs for users.

DistSQL

DistSQL has been optimized in terms of user experience, adding more calibration and reducing the possibility of user configuration errors in using DistSQL. We also fixed an issue where some user input conflicted with DistSQL keywords.

Distributed Governance

In terms of read/write splitting and database discovery, in addition to the original MGR, MySQL adds a new database discovery method by querying primary-secondary delay, which can automatically switch read/write splitting data sources by getting the secondary delay, reducing the threshold for users to use dynamic read/write splitting.

In cluster mode, the metadata storage structure has been optimized and reconstructed, and the problems caused by ZooKeeper session timeout and case mismatch on table names have been fixed.

Distributed Transactions

In terms of transactions, ShardingSphere-JDBC adds support for Savepoint, and ShardingSphere-Proxy adds support for Savepoint in XA scenarios, in addition to the original support for Savepoint for LOCAL transactions.

When Narayana is used as an XA implementation, ShardingSphere supports the configuration of Narayana to make the use of XA more conveniently.

With PostgreSQL / openGauss, when an exception occurs in a transaction, ShardingSphere can properly abort the transaction and automatically roll back.

The above is an introduction to some of the updates to Apache ShardingSphere 5.1.1, please refer to the update log for details. The ShardingSphere community will be releasing detailed explanations of some of these features, so stay tuned.

ShardingSphere 5.1.1 has no changes at the API level but has made many improvements in functionality and performance — you’re welcome to try it out.

Update Log

New Features

Optimizations

Refactoring

Problem Fixes

Image description

ShardingSphere Github

ShardingSphere Twitter ShardingSphere Slack ShardingSphere Medium ShardingSphere Release Note

Author

Weijie WU

SphereEx Infrastructure R&D Engineer, Apache ShardingSphere PMC He focuses on the R&D of Apache ShardingSphere interface and ShardingSphere subproject ElasticJob.