V4.3.3 hotfix1
Version information
Release date: January 20, 2025
Version: V4.3.3 hotfix1
RPM version: obproxy-4.3.3.0-202025012014
Overview
OceanBase Database Proxy (ODP) allows you to perform batch get operations through ObTableLSOpRequest requests.
Bug fixes
Fixed the issue where the read and write addresses in a read/write splitting scenario are invalid when the primary zone setting contains only one zone.
Fixed the issue where the
fetch out of sequenceerror is reported when an SQL statement is executed in an obtrade test.
V4.3.3
Version information
Release date: December 30, 2024
Version: V4.3.3
RPM version: obproxy-4.3.3.0-152024123010
Overview
ODP V4.3.3 is the latest version of the ODP V4.3.x series and is recommended for on-cloud and on-premises business in a proof of concept (POC) test or production environment. The SQL proxy allows an on-cloud user to enable read/write splitting between the primary and standby tenants by using one connection string, thus enriching the capabilities of the primary and standby tenants. Routing capabilities are improved in the following ways: replicated table-based routing and routing for weak-consistency reads within a transaction are optimized to meet your requirements for routing of special tables in specific scenarios; more character sets and collations such as utf16le, sjis, dec8, utf8mb4_german2_ci, and HKSCS are supported; accurate routing is realized for the TO_DAYS() and TIMESTAMP expressions. Abundant monitoring information such as the prepared statement (PS) cache and routing information improves the usability of diagnostics. Several protocol-related issues are fixed to improve stability. The remote procedure call (RPC) proxy supports different authentication logic for on-cloud and on-premises user environments to improve the authentication mechanism. OBKV-Redis commands are introduced to optimize the processing logic and improve performance. ODP V4.3.3 is fully compatible with Rocky Linux 9.
Key features
SQL proxy
Read/Write splitting between the primary and standby tenants
OceanBase Cloud supports geo-disaster recovery for the clusters where primary and standby tenants reside. However, it requires you to switch between domain names in scenarios other than database switchover, which is less flexible compared to ODP for off-cloud users. As more on-cloud users adopt the primary/standby architecture for tenants, capabilities of this architecture must be improved to support read/write splitting and primary/standby switchover with one connection string.
ODP V4.3.3 supports read/write splitting between the primary and standby tenants, allowing automatic login to on-premises clusters where the primary and standby tenants reside without modifying the login connection string and automatic read/write splitting between these clusters. To reduce the cross-region bandwidth costs, a compression protocol is used between ODP and OceanBase Database.
Read/Write splitting between the primary and standby tenants applies only to the primary/standby tenant architecture of OceanBase Database V4.x, to ensure ultimate consistency for weak-consistency read requests.
Routing improvement
Support for more character sets
ODP supports accurate routing of SQL requests that use the following character sets and collations: utf16le, sjis, dec8, utf8mb4_german2_ci, and HKSCS.
Optimized replicated table-based routing
Replicated tables apply to scenarios with more reads than writes. A query to a replicated table achieves the best performance if it reads data from the local replica. Therefore, ODP uses random routing for replicated tables. However, if a replicated table in a transaction is modified, a query randomly routed to a follower of the replicated table may not read the latest data. To resolve this problem, ODP V4.3.3 optimizes the routing strategy to route queries for a replicated table modified in a transaction to the leader of the replicated table.
Optimized routing for weak-consistency reads within a transaction
If a write or
SELECT FOR UPDATEstatement is executed in a transaction and subsequent read statements attempt to access the uncommitted modifications of the transaction, these read statements must be executed as strong-consistency reads, and ODP routes the read statements to the leader for execution. If the read statements are configured as weak-consistency reads, they will be randomly routed to followers. ODP V4.3.3 optimizes this routing logic to route weak-consistency read statements following a write statement in a transaction to the leader as strong-consistency read statements.Accurate routing for more expressions, such as
TO_DAYS(),TIMESTAMP 'xxxxx', andNOT IN
Support for the binlog service
ODP V4.3.3 supports the
log_bin_basenamevariable and theSHOW MASTER LOGSsyntax.ODP V4.3.3 allows you to specify the username and password for logging in to the binlog service.
Usability of diagnostics
PS cache monitoring
In a scenario where the PS protocol is used, a client may keep a large amount of PS caches in use, which occupy a large amount of memory and degrades the performance. It is difficult to diagnose such an issue. To improve troubleshooting efficiency for PS protocol-related issues, ODP provides PS cache information in Prometheus monitoring, such as the number of allocated PS caches and memory usage, and periodically outputs the monitoring data. It also allows you to execute the
SHOW PROXYPSstatement to query information in the PS cache, such as the SQL text, parsing results, and memory usage of prepared statements, to improve the usability of diagnostics.For more information, see SHOW PROXYPS.
Routing monitoring
ODP provides routing statistics in Prometheus monitoring, such as the number of routing requests per unit time in a transaction, number of secondary routing requests, number of random routing requests after partition calculation fails, and number of routing requests based on the global index table.
RPC proxy
Support for more OBKV-Redis commands
OBKV-Redis is supported in ODP V4.3.2 and later. ODP V4.3.3 introduces the client commands
CLIENT LIST,CLIENT INFO, andMONITORto enrich the protocol command list. For more information, see the Client commands section in OBKV-Redis.OBKV-Redis performance optimization
ODP V4.3.3 optimizes the overall processing procedure of OBKV-Redis, thus reducing the CPU utilization from 95% to approximately 50% and improving the performance by 13% compared with ODP V4.3.1.
Improved authentication mechanism
OBKV-Redis supports multitenancy. In an on-cloud environment, ODP can obtain tenant names and cluster names. In an on-premises environment, ODP heavily relies on users to transparently transmit tenant and cluster information. ODP provides different authentication logic for different user environments, thus improving the authentication mechanism.
Compatibility changes
Parameter changes
| Parameter | Change type | Description |
|---|---|---|
| enable_standby_read_write_split | New | Specifies whether to enable read/write splitting between the primary and standby tenants. Default value: false. The setting takes effect only for new connections. |
| enable_check_cluster_name | New | Specifies whether to verify the cluster name in a three-segment string used for login. |
| rootservice_cluster_name | Modified | Specifies the cluster where the standby tenant to which the service name is to be mapped resides when multiple standby tenants exist across multiple clusters. |
| rpc_redis_default_user_name | Modified | The user_name format is now supported for the value of this parameter, in addition to the user_name@tenant_name#cluster_name format supported in earlier versions. |
Variable changes
| Variable | Change type | Description |
|---|---|---|
| log_bin_basename | New | ODP can forward this variable to the binlog service to query the prefixes of binlog file names. |
Syntax changes
| Syntax | Change type | Description |
|---|---|---|
| SHOW PROXYPS | New | ODP allows you to execute this statement to query PS cache information. Each row in the result set displays information about a PS cache, such as the cached prepared SQL statement, statement parsing results, and memory usage. |
| SHOW MASTER LOGS | New | ODP can forward this statement to the binlog service. |
Supported OceanBase Database versions
ODP supports OceanBase Database V4.x and OceanBase Database V3.x and earlier. The recommended ODP version varies based on the OceanBase Database version.
For OceanBase Database V3.x and earlier, ODP V3.2.11 is recommended.
For OceanBase Database V4.x, ODP V4.3.1, which is a Long-Term Support (LTS) version, is recommended.
ODP V4.3.3 provides multiple new features. We recommend that you use ODP V4.3.3 if your environment relies on the new features, or the LTS version V4.3.1 if otherwise.
Bug fixes
Fixed the issue where routing calculation hangs when the character set or data type is not supported.
Fixed the issue where the detected transaction status is inaccurate when a cross-server transaction request handling exception occurs in distributed transaction routing.
Fixed the issue where no PS cache is created when a
COM_STMT_PREPARE_EXECUTErequest is executed.Fixed the issue where an existing prepared statement is dropped by mistake when the
PREPAREstatement attempts to create a statement with the same name but fails, leading to an error during the execution of theDEALLOCATE PREPAREstatement.Fixed the issue where a
COM_STMT_SEND_LONG_DATArequest exceeding 16 MB in size cannot be forwarded.Fixed the issue where an error is returned because ODP does not support two consecutive requests in the MySQL packet format.
Fixed the issue where the driver hangs after calling the
mysql_change_user()operation when ODP fails to forward theAuthSwitchResponsepacket.Fixed the issue where a MySQL 8.0.22 client fails to connect to OceanBase Database with a password from ODP.
Fixed the issue where ODP does not randomly distribute SQL requests when the partitioning key of a partitioned table is missing.
Fixed the issue where routing is inaccurate when the tablet IDs of partitioned tables of different tenants in one cluster are the same.
Fixed the issue where SQL requests are executed in remote mode because distributed transaction routing is not enabled for routing requests when the PreparedStatement and PrepareExecute protocols are enabled.
Fixed the issue where distributed transaction routing for SQL requests in anonymous blocks fails, causing a disconnection after retry validation failure.
Fixed the issue where the client hangs after the BenchmarkSQL test is completed.
Fixed the issue where an error is returned when the GO client sends data larger than 16 MB through a
send_long_datarequest.Fixed the issue where ODP generates a large amount of error logs for Jedis connections because ODP does not support the
CLIENT SETINFOcommand.