apache/shardingsphere
64.7
Adequate · 24 October 2026
353.8k
lines of production code
Java
primary language
5
measurements over time
What this system is
This system is a distributed database middleware and proxy framework that provides transparent access to heterogeneous backends like MySQL, PostgreSQL, and Oracle. It handles SQL parsing, routing, and rewriting while managing data through sharding, read-write splitting, encryption, and masking. The platform supports distributed transactions, SQL federation, and real-time data migration via CDC, complemented by an agent-based observability system and an MCP interface for AI-driven management.
How it got here
2016–2023 — Agent framework and distributed transaction expansion
195 changes.
This period focused on establishing the ShardingSphere Agent as a first-class component, introducing a comprehensive plugin architecture for OpenTelemetry tracing, Prometheus metrics, and file logging. Concurrently, the project significantly expanded its distributed transaction capabilities by implementing XA and BASE transaction support with Atomikos and Narayana integrations, alongside a new Global Clock service for timestamp coordination. The work also included extensive refactoring of rule configurations to enforce Bean Validation and the introduction of new features like SQL translation, data masking, and CDC-based data pipelines.
2024–2025 — Database connector and protocol expansion
175 changes.
This period focused on establishing a comprehensive database connector infrastructure and expanding protocol support for multiple dialects including MySQL, PostgreSQL, Oracle, and Firebird. The work involved implementing new SQL parsers, refining the JDBC driver architecture, and introducing detailed metadata handling and privilege checking for each supported database type.
2026 — MCP integration and AI workflow tooling
50 changes.
This period focused on the initial release and expansion of the ShardingSphere Model Context Protocol (MCP) server, establishing the core runtime, transport layers, and API for AI agent integration. Significant effort was dedicated to implementing MCP feature plugins for database governance tasks, including encryption, masking, sharding, and readwrite-splitting workflows. The work also included foundational infrastructure updates such as a pluggable Calcite provider for SQL Federation, refined identifier case-sensitivity handling, and enhanced automated testing and code review skills.
Features
Add AES cryptographic algorithm implementation
This change introduces a new AES cryptographic algorithm (\AESCryptographicAlgorithm\) and its default properties provider (\DefaultAESPropertiesProvider\) within the \infra/algorithm/type/cryptographic/type/aes\ module. The implementation registers the algorithm via SPI, allowing users to encrypt and decrypt data using AES with a configurable secret key derived from a specified digest algorithm (e.g., SHA-1). The module includes unit tests verifying initialization constraints (such as requiring a non-empty AES key and digest algorithm) and successful encryption/decryption cycles.
database/connector/dialect/sql92/src/main, infra/algorithm/type/cryptographic/type/aes, infra/algorithm/type/message-digest/type/md5 · high confidence
Add Atomikos XA recoverable resource for transaction recovery
The Atomikos XA transaction provider now includes a new AtomikosXARecoverableResource class that extends JdbcTransactionalResource. This class implements the usesXAResource method to identify recoverable resources by comparing the resource name against the SingleXAResource interface, enabling proper transaction recovery handling for XA transactions managed by Atomikos.
shardingsphere-transaction-xa-atomikos · high confidence
Add CDC DistSQL parser for streaming rule management
This change introduces the parser module for CDC DistSQL, enabling users to manage streaming transmission rules via SQL commands. The new grammar and visitor logic support SHOW STREAMING LIST, SHOW STREAMING STATUS, DROP STREAMING, SHOW STREAMING RULE, and ALTER STREAMING RULE statements. These commands allow administrators to inspect, modify, and remove streaming configurations, including read/write definitions, worker threads, batch sizes, sharding sizes, rate limiters, and stream channels.
kernel/data-pipeline/scenario/cdc/distsql/parser · high confidence
Add DialectSQLBatchOption class to expose SQL batch support capability
A new DialectSQLBatchOption class has been added to the database connector core module. This class encapsulates a boolean flag indicating whether a specific database dialect supports SQL batch operations, providing a structured way to expose this capability to consumers of the metadata system.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/metadata/option/sqlbatch · high confidence
Add DistSQL handlers for Global Clock rule management
This change introduces the DistSQL handler components for the Global Clock feature, enabling users to query and modify the Global Clock rule configuration via DistSQL. It adds a \ShowGlobalClockRuleExecutor\ to display the current rule settings (type, provider, enabled status, and properties) and an \AlterGlobalClockRuleExecutor\ to update the rule configuration. Additionally, a \GlobalClockExportedSnapshotInfoGenerator\ is included to export the Global Clock's current timestamp (CSN) as part of the cluster metadata snapshot. The implementation is wired into the framework via SPI service files and includes corresponding unit and integration tests.
kernel/global-clock/distsql/handler · high confidence
Add DistSQL handlers for showing and altering pipeline transmission rules
Users can now view and modify data-pipeline transmission configurations via DistSQL. The new \ShowTransmissionRuleQueryResult\ handler exposes the current read, write, and stream-channel settings for a specified job type, while the \AlterTransmissionRuleExecutor\ allows updating these settings (including worker threads, batch sizes, rate limiters, and stream channel types) and validates that the specified stream channel type is supported before persisting the changes.
kernel/data-pipeline/distsql/handler · high confidence
Add DistSQL handlers for showing and altering the SQL Translator rule
This change introduces the DistSQL handler implementations for the SQL Translator rule, enabling users to manage the rule via DistSQL. Specifically, it adds a \ShowSQLTranslatorRuleExecutor\ that allows users to view the current translator configuration (type, properties, and the \useOriginalSQLWhenTranslatingFailed\ flag) using the \SHOW SQL\_TRANSLATOR RULE\ command, and an \AlterSQLTranslatorRuleExecutor\ that supports updating the rule's provider type, properties, and fallback behavior via the \ALTER SQL\_TRANSLATOR RULE\ command. The handlers are registered via SPI service files and include corresponding test fixtures and test cases to verify the query and update operations.
kernel/sql-translator/distsql/handler · high confidence
Add DistSQL handlers for streaming CDC job management
This change introduces new DistSQL query and update executors in the CDC handler package to support streaming data pipeline operations. Users can now execute DistSQL commands to list streaming jobs, view detailed job status (including progress, idle time, and error messages), inspect streaming rules, and drop streaming jobs. The implementation registers these executors via SPI service files, enabling the system to handle SHOW STREAMING LIST, SHOW STREAMING STATUS, SHOW STREAMING RULE, and DROP STREAMING statements.
kernel/data-pipeline/scenario/cdc/distsql/handler · high confidence
Add DistSQL parser for SQL Federation configuration
This change introduces the DistSQL parser module for SQL Federation, enabling users to manage federation settings via the \ALTER SQL\_FEDERATION RULE\ and \SHOW SQL\_FEDERATION RULE\ commands. The parser supports configuring \ALL\_QUERY\_USE\_SQL\_FEDERATION\ (boolean), \PROVIDER\_TYPE\ (string), and \EXECUTION\_PLAN\_CACHE\ (with \INITIAL\_CAPACITY\ and \MAXIMUM\_SIZE\ integers), allowing administrators to control query routing and caching behavior for federated SQL execution.
kernel/sql-federation/distsql/parser · high confidence
Add DistSQL parser for SQL Translator rule management
This change introduces the DistSQL parser components for the SQL Translator feature, enabling users to manage SQL translation rules via distributed SQL commands. The diff adds ANTL4 grammar files (Alphabet, BaseRule, Keyword, Literals, RALStatement, Symbol, SQLTranslatorDistSQLStatement) defining the syntax for SHOW and ALTER SQL\_TRANSLATOR RULE statements, along with the corresponding Java lexer, parser, and visitor classes. A new SQLTranslatorDistSQLParserFacade is registered via the Java SPI mechanism to expose this parser to the DistSQL engine, allowing administrators to configure algorithm definitions and properties for SQL translation.
kernel/global-clock/distsql/parser, kernel/sql-parser/distsql/parser, kernel/sql-translator/distsql/parser · high confidence
Add DistSQL parser for authority rules
The authority module now includes a dedicated DistSQL parser that enables parsing of authority-related commands, specifically the SHOW AUTHORITY RULE statement. This change introduces the necessary ANTLR grammar files, lexer, parser, and visitor classes, along with a facade implementation registered via the Java SPI mechanism to integrate with the DistSQL engine.
kernel/authority/distsql/parser · high confidence
Add DistSQL parser for database migration scenarios
This change introduces the DistSQL parser components for the data-pipeline migration scenario, enabling users to manage migration jobs via SQL commands. The new parser supports statements for registering and unregistering source storage units, migrating tables, and controlling migration lifecycle (start, stop, rollback, commit, check). It also provides commands to view migration rules, lists, and status, as well as to alter transmission rules for configuring worker threads, batch sizes, sharding sizes, rate limiters, and stream channels.
kernel/data-pipeline/scenario/migration/distsql/parser · high confidence
Add DistSQL parser for single-table management commands
This change introduces the parser components for the single-table DistSQL feature, enabling users to manage single tables via SQL commands. The diff adds ANTLR grammar files (RDLStatement, RQLStatement) and Java classes (lexer, parser, visitor, facade) to support specific commands: SET DEFAULT SINGLE TABLE STORAGE UNIT, LOAD SINGLE TABLE, UNLOAD SINGLE TABLE, SHOW SINGLE TABLES, SHOW UNLOADED SINGLE TABLES, SHOW DEFAULT SINGLE TABLE STORAGE UNIT, and COUNT SINGLE TABLE. The SingleDistSQLParserFacade is registered via META-INF/services to integrate these new parsing capabilities into the DistSQL engine.
kernel/single/distsql/parser · high confidence
Add DistSQL parser for transaction rule configuration
Users can now manage distributed transaction rules via DistSQL. This change introduces the ANTLR grammar and Java parser components (lexer, parser, visitor, and facade) for the \SHOW TRANSACTION RULE\ and \ALTER TRANSACTION RULE\ commands, enabling the configuration of default transaction types (LOCAL, XA, BASE) and provider settings (Atomikos, Narayana).
kernel/transaction/distsql/parser · high confidence
Add DistSQL statements for CDC streaming management
Added DistSQL statement classes to support querying and managing CDC streaming pipelines. Users can now use DistSQL commands to show the list of streaming jobs, view streaming rules, check the status of a specific streaming job by ID, and drop a streaming job by ID.
kernel/data-pipeline/scenario/cdc/distsql/statement · high confidence
Add DistSQL statements for Global Clock rule management
Users can now manage Global Clock rules via DistSQL. This change introduces \ShowGlobalClockRuleStatement\ to query existing Global Clock rules and \AlterGlobalClockRuleStatement\ to modify them, supporting configuration of type, provider, enabled status, and custom properties.
kernel/global-clock/distsql/statement · high confidence
Add DistSQL statements for SQL Translator rules
Users can now manage SQL Translator configuration via DistSQL. The system introduces \ShowSQLTranslatorRuleStatement\ to display current translator rules and \AlterSQLTranslatorRuleStatement\ to modify them, allowing users to specify the algorithm provider and configure whether to fall back to original SQL when translation fails.
kernel/sql-translator/distsql/statement · high confidence
Add DistSQL statements for managing transaction rules
This change introduces new DistSQL statement classes in the transaction module to allow users to query and modify transaction rule configurations. Specifically, it adds \ShowTransactionRuleStatement\ to retrieve current transaction rule settings, and \AlterTransactionRuleStatement\ to update them, including support for specifying a default provider type and provider properties via the new \TransactionProviderSegment\.
kernel/transaction/distsql/statement · high confidence
Add DistSQL support for showing and altering transaction rules
Users can now manage transaction configuration via DistSQL. The new \ShowTransactionRuleExecutor\ allows querying the current transaction rule settings (default type, provider type, and properties) using the \SHOW TRANSACTION RULE\ command, while the \AlterTransactionRuleExecutor\ enables updating these settings with \ALTER TRANSACTION RULE\. This change introduces the specific handler implementations and their corresponding SPI registrations in the \kernel/transaction/distsql/handler\ module, along with the test fixtures and case definitions required to validate these operations.
kernel/transaction/distsql/handler · high confidence
Add DistSQL-only rule workflow plugins for readwrite-splitting
This change introduces the service provider registrations and MCP descriptors required to support DistSQL-only rule workflows for readwrite-splitting. It adds the \ReadwriteSplittingMCPHandlerProvider\ and \ReadwriteSplittingRuleDistSQLStatementClassifier\ SPI implementations, along with a YAML descriptor that defines resources for listing rules, checking rule and storage-unit status, and counting rules. It also includes prompt templates that guide the model to plan readwrite-splitting rule and status workflows by reading current state first, asking for missing inputs, and stopping after planning without executing physical DDL or storage unit repairs.
mcp/features/readwrite-splitting · high confidence
Add Doris database type support
Users can now connect to Apache Doris databases through the connector. This change introduces the DorisDatabaseType implementation, which identifies Doris connections via jdbc:mysql and jdbc:mysqlx URL prefixes and maps them to the MySQL trunk database type for underlying compatibility. The type is registered via the Java SPI mechanism and includes unit tests to verify the JDBC prefix detection and trunk type resolution.
database/connector/dialect/doris · high confidence
Add ETCD and ZooKeeper mode configuration URL loaders
Users can now configure ShardingSphere's cluster mode using ETCD or ZooKeeper by providing URLs with the 'etcd:' or 'zookeeper:' prefixes. This change introduces new URL loaders that parse the server list and required 'namespace' property to build the corresponding ClusterPersistRepositoryConfiguration, enabling these distributed coordination services as backends for the cluster mode.
infra/url/type/etcd, infra/url/type/zookeeper · high confidence
Add HighFrequencyInvocation annotation for marking high-throughput code paths
A new \HighFrequencyInvocation\ annotation has been added to the \infra/annotation\ module to mark declarations on code paths that repeat frequently under normal workloads, such as SQL execution or metadata queries. This annotation includes a \canBeCached\ attribute to indicate whether the annotated target has a reusable cacheable resource, helping developers identify and optimize high-frequency operations.
infra/annotation · high confidence
Add HistogramBucketUtils for exponential bucket configuration
A new utility class, HistogramBucketUtils, has been added to the metrics core module. It provides a static method to retrieve a predefined configuration map for histogram buckets, specifically setting up an exponential distribution with a start of 1, a factor of 2, and a count of 13. This utility supports the underlying metrics collection logic by standardizing bucket definitions.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/util · high confidence
Add Hybrid Logical Clock provider interface
A new HLCProvider interface has been introduced in the global clock module to support Hybrid Logical Clocks. This interface extends the existing GlobalClockProvider, enabling the system to utilize HLC-based timestamping for global clock operations.
kernel/global-clock/type/hlc · high confidence
Add JDBC metadata and state metrics exporters
The agent now exports two new Prometheus-style metrics for ShardingSphere-JDBC: \jdbc\_meta\_data\_info\ (a gauge exposing the storage unit count per driver instance and database) and \jdbc\_state\ (a gauge indicating the current instance state, where 0 represents OK and 1 represents circuit break). These exporters iterate over registered data source contexts to gather real-time metadata and health status, enabling users to monitor the structural configuration and operational state of their JDBC deployments.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/jdbc · high confidence
Add MCP integration for planning and applying encrypt rules
The encrypt feature now exposes Model Context Protocol (MCP) capabilities, allowing users to plan and apply encryption rules via AI-driven workflows. This includes a new handler provider registration, a descriptor defining resources for listing encrypt algorithms and rules, and a 'Plan Encrypt Rule' tool that generates reviewable DistSQL artifacts. A companion prompt guides the model to safely collect context, select algorithms, and require user approval before applying changes, ensuring sensitive data like keys are never exposed in prompts.
mcp/features/encrypt · high confidence
Add MariaDB dialect connector with transaction and type metadata
This change introduces the MariaDB dialect connector, enabling ShardingSphere to recognize and handle MariaDB databases. It registers a new \MariaDBDatabaseType\ that identifies connections via the \jdbc:mariadb:\ URL prefix and delegates to the MySQL trunk type. Additionally, it provides \MariaDBDatabaseMetaData\ which specifies MariaDB-specific transaction options, including a \DDLCommitPolicy\ of \NO\_ADDITIONAL\_COMMIT\ and support for the \org.mariadb.jdbc.MariaDbDataSource\.
database/connector/dialect/mariadb/src/main · high confidence
Add NativeSQLTranslator as a passthrough SQL translation provider
This change introduces the NativeSQLTranslator component, which implements the SQLTranslator SPI to provide a 'passthrough' translation mode. When the translator type is set to 'NATIVE', SQL statements and their parameters are returned in the context without modification, bypassing any rewriting or optimization logic. This allows users to disable SQL translation for specific queries or configurations.
kernel/sql-translator/provider/native · high confidence
Add PostgreSQL and openGauss protocol packet implementations
The PostgreSQL and openGauss protocol modules now include core packet handling classes, including \PostgreSQLComBindPacket\ and \OpenGaussComBatchBindPacket\ for processing bind commands, \PostgreSQLErrorResponsePacket\ for error handling, \PostgreSQLRandomGenerator\ for secure random number generation, and \PostgreSQLPacketPayload\ for low-level byte buffer operations. These additions provide the foundational packet parsing and serialization logic required for the PostgreSQL wire protocol.
shardingsphere-database-protocol-opengauss, shardingsphere-database-protocol-postgresql · high confidence
Add Prometheus metrics collectors for the ShardingSphere Agent
The Prometheus metrics plugin for the ShardingSphere Agent now includes dedicated collector implementations for Counter, Gauge, GaugeMetricFamily, Histogram, and Summary metric types. These new classes in the \collector.type\ package bridge the agent's internal metric configuration to the Prometheus Java client, enabling users to expose these specific metric types from the agent to their Prometheus monitoring infrastructure.
shardingsphere-agent-metrics-prometheus · high confidence
Add Prometheus metrics exporter
A new PrometheusMetricsExporter class has been added to the agent's metrics plugin, enabling the system to export collected metrics in a format compatible with Prometheus monitoring. This exporter implements the Prometheus Collector interface to gather metric data and expose it for scraping.
agent/plugins/metrics/type/prometheus/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/prometheus/exoprter · high confidence
Add QualifiedDataSourceDeletedEvent for read-write splitting data source lifecycle
The read-write splitting core module now includes a new QualifiedDataSourceDeletedEvent class that implements DeliverEvent. This event carries a QualifiedDataSource reference and enables the system to notify subscribers when a qualified data source is deleted, supporting proper lifecycle management and cleanup within the read-write splitting feature.
shardingsphere-readwrite-splitting-core · high confidence
Add Random and Round-Robin load balancing algorithms
This change introduces two new load-balancing strategies for distributing requests across available targets: a Random algorithm (type "RANDOM") that selects a target uniformly at random, and a Round-Robin algorithm (type "ROUND\_ROBIN") that cycles through targets sequentially. The Round-Robin implementation uses \Math.floorMod\ to safely handle counter overflow, ensuring correct behavior even when the internal atomic counter wraps around. Both algorithms are registered via SPI and include unit tests verifying their selection logic and edge cases.
infra/algorithm/type/load-balancer/type/round-robin · high confidence
Add Redis-based TSO provider for global clock
Users can now configure the Global Clock to use Redis as the backend for the Timestamp Oracle (TSO) service. This change introduces the \RedisTSOProvider\ implementation, which manages a distributed sequence number (CSN) stored in Redis. Configuration is handled via specific property keys including \host\, \port\, \password\, \timeoutInterval\, \maxIdle\, and \maxTotal\, allowing users to tune the Jedis connection pool and Redis connection details.
kernel/global-clock/type/tso/provider/redis · high confidence
Add RootSpanContext for managing root span state
The tracing core module now includes a new RootSpanContext class that uses a TransmittableThreadLocal to store and retrieve the root span object. This provides a centralized mechanism for agent plugins to access the current root span context across thread boundaries.
agent/plugins/tracing/core/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/core · high confidence
Add SHOW AUTHORITY RULE DistSQL command
Users can now execute the SHOW AUTHORITY RULE DistSQL command to view the current authority configuration. This new executor returns a table with columns for users (grantees), the privilege provider type, and provider properties, allowing administrators to inspect how authority rules are currently set up in the system.
kernel/authority/distsql/handler · high confidence
Add SQL Server support for SQL federation connection configuration
Users can now use SQL Server as a dialect in SQL federation. This change introduces the SQLServerSQLFederationConnectionConfigBuilder, which configures the underlying Calcite connection with SQL Server-specific settings (LEX.SQL\_SERVER, SQL\_SERVER\_2008 conformance, and STANDARD libraries) and registers it via the Java SPI mechanism so the federation engine recognizes SQL Server connections.
kernel/sql-federation/dialect/sqlserver · high confidence
Add SQL Server-specific SQL statement binding and context warping
This change introduces the SQL Server dialect's SQL binding engine and statement context provider. It adds a dedicated binder for the \DENY USER\ statement, ensuring that table and column segments are correctly resolved during the binding phase. Additionally, it registers the SQL Server context warp provider to handle specific statement types, enabling proper internal representation for SQL Server-specific DCL operations.
infra/binder/dialect/sqlserver · high confidence
Add ShowAuthorityRuleStatement for displaying authority rules
Users can now view authority rules via a new DistSQL statement. This change introduces the \ShowAuthorityRuleStatement\ class, which extends \ShowGlobalRulesStatement\, enabling the system to expose authority-specific configuration details through the distributed SQL interface.
kernel/authority/distsql/statement · high confidence
Add TSO provider SPI interface
A new TSOProvider interface has been added to the global clock SPI module, extending GlobalClockProvider to define the contract for Time Stamp Oracle implementations.
kernel/global-clock/type/tso/spi · high confidence
Add absolute path and classpath URL loaders for configuration files
Users can now load ShardingSphere configuration files using \absolutepath:\ and \classpath:\ URL schemes. The \AbsolutePathLocalFileURLLoader\ reads configuration from a specified absolute file system path, while the \ClassPathLocalFileURLLoader\ loads resources from the application classpath. Both implementations register via the \ShardingSphereLocalFileURLLoader\ SPI, enabling flexible configuration sourcing beyond standard resource URLs.
infra/url/type/absolutepath, infra/url/type/classpath · high confidence
Add build information metrics exporter
A new BuildInfoExporter has been introduced to expose build metadata as a gauge metric. This exporter registers a 'build\_info' metric labeled with 'name' and 'version', automatically populating it with the current ShardingSphere version at export time, allowing users to track the specific version of the agent or component in their monitoring dashboards.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl · high confidence
Add core distributed lock implementation for cluster mode
The cluster-mode-repository-core module now includes the core implementation for distributed locking, introducing the DistributedLockHolder utility and the DefaultDistributedLock class. This change provides a thread-safe, reentrant distributed lock mechanism that leverages the ClusterPersistRepository to manage lock acquisition and release, along with supporting typed properties for lock configuration. Tests have been added to verify lock acquisition, reentrancy, and release behavior.
mode/type/cluster/repository/core · high confidence
Add database metadata enumeration types
The database connector core module introduces three new enumeration types to support metadata handling: NullsOrderType defines how null values are ordered relative to non-null values in sorting operations; QuoteCharacter provides utilities for identifying, wrapping, and unwrapping various SQL quote delimiters (such as backticks, double quotes, and brackets); and TableType distinguishes between standard tables and views within the database metadata structure.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/enums · high confidence
Add database-level permitted privilege provider
Introduces the DatabasePermittedPrivilegeProvider, which allows users to configure database access permissions via the \user-database-mappings\ property (format: \username@hostname=database\). This provider resolves which databases a specific user-grantee is permitted to access based on these mappings, supporting wildcards for both hosts and database names, and is registered as a \DATABASE\_PERMITTED\ privilege provider.
kernel/authority/provider/database · high confidence
Add etcd as a cluster mode repository provider
Users can now configure etcd as the underlying persistence layer for ShardingSphere's cluster mode. This change introduces the \EtcdRepository\ implementation, which handles data persistence, ephemeral node management, and distributed locking via the etcd Java client. It also includes configuration support for etcd-specific properties such as time-to-live and connection timeout, along with the necessary service loader registration to make the provider available.
mode/type/cluster/repository/provider/etcd, mode/type/standalone/repository/provider/memory · high confidence
Add literal inline expression parser
Introduces a new literal inline expression parser that splits comma-separated values into a list of strings, enabling users to define static, comma-delimited expressions (such as table or column lists) without dynamic evaluation or placeholder support.
infra/expr/type/literal · high confidence
Add logging for metadata context build duration
The file logging plugin now records the time taken to build metadata contexts. A new advice class logs the elapsed milliseconds when the metadata context construction completes, providing visibility into the performance of this initialization step.
shardingsphere-agent-logging-file · high confidence
Add openGauss dialect support to ShardingSphere-Proxy
This change introduces the openGauss protocol dialect to ShardingSphere-Proxy, enabling the proxy to accept and process connections from openGauss clients. It adds the \OpenGaussFrontendEngine\ to manage the connection lifecycle and authentication, an \OpenGaussCommandExecuteEngine\ to route and execute commands, and specific executors like \OpenGaussComBatchBindExecutor\ to handle batch binding operations. This allows users to connect openGauss-compatible clients to the proxy, leveraging the underlying PostgreSQL protocol implementation with openGauss-specific packet handling.
shardingsphere-proxy-frontend-opengauss · high confidence
Add openGauss incremental data pipeline support
This change introduces the openGauss dialect for the data pipeline, enabling incremental data ingestion via logical replication. It includes the OpenGaussIncrementalDumper to consume WAL events using the MppdbDecodingPlugin, an OpenGaussIncrementalPositionManager to manage replication slots and WAL positions, and an OpenGaussInventoryColumnValueReader to handle specific data types like money and bit. The implementation also provides SQL building capabilities for schema creation, table definition extraction, and duplicate key handling, along with JDBC stream query builders and data source preparation options specific to openGauss.
kernel/data-pipeline/dialect/opengauss · high confidence
Add openGauss protocol frontend support to the proxy
The proxy now supports the openGauss database dialect, enabling clients to connect using the openGauss wire protocol. This change introduces the OpenGaussFrontendEngine, which handles the full connection lifecycle including SSL negotiation, startup message processing, and password authentication via MD5 and SCRAM-SHA-256. It also implements command execution for simple queries and batch binds, and provides error packet translation to ensure compatibility with openGauss clients.
proxy/frontend/dialect/opengauss · high confidence
Add openGauss support for SQL Federation
This change introduces the openGauss dialect implementation for SQL Federation, enabling the engine to route and execute queries against openGauss databases using Calcite. It registers specific openGauss system functions (such as \gs\_password\_deadline\ and \version\) in the \pg\_catalog\ schema, delegates other function resolution to the PostgreSQL implementation, and explicitly marks \NLSSORT\ as an unsupported function. Additionally, it configures the Calcite connection settings for openGauss to use Java lexical rules, Babel conformance, and the PostgreSQL SQL library.
database/connector/dialect/opengauss/src/main, kernel/sql-federation/dialect/opengauss, parser/sql/engine/dialect/presto · high confidence
Added MySQL Data Administration Language (DAL) statement parsers
The MySQL SQL parser now supports a comprehensive set of Data Administration Language (DAL) statements, enabling the system to parse and understand administrative commands. This includes statements for managing server state (SHUTDOWN, RESTART, FLUSH), controlling replication (CHANGE MASTER, START/STOP SLAVE/REPLICA, SHOW BINARY LOGS/EVENTS), handling plugins and components (INSTALL/UNINSTALL PLUGIN, INSTALL/UNINSTALL COMPONENT), and other administrative tasks (KILL, RESET, USE, CACHE INDEX, HELP). Several of these statements, such as KILL, RESET, and USE, are configured to allow execution without requiring a specific database context.
parser/sql/statement/dialect/mysql · high confidence
Added Oracle SQL statement models for DDL and DAL operations
The Oracle parser dialect now includes new statement model classes to support parsing a broader range of Oracle-specific SQL commands. This adds support for Data Definition Language (DDL) statements such as creating and altering object types (nested table, varray, subtypes), managing clusters, contexts, database links, and audit policies, as well as Data Administration Language (DAL) statements like ALTER RESOURCE COST, CHANGE, LIST, REPORT, and SPOOL. Users can now parse these Oracle-specific administrative and structural commands within the parser.
parser/sql/statement/dialect/oracle · high confidence
Added PostgreSQL statement models for DDL, DCL, and DAL operations
The PostgreSQL parser now includes new statement model classes for a range of previously unsupported commands, enabling the system to recognize and parse these SQL structures. This update adds models for Data Definition Language (DDL) operations such as CLUSTER, DECLARE, DISCARD, IMPORT FOREIGN SCHEMA, LISTEN/UNLISTEN, NOTIFY, and various operator and user mapping management statements. It also introduces models for Data Control Language (DCL) commands like CREATE GROUP and REASSIGN OWNED, as well as Data Administration Language (DAL) commands including CHECKPOINT, LOAD, RESET PARAMETER, and VACUUM. Users can now execute queries involving these specific PostgreSQL features without encountering parsing errors.
parser/sql/statement/dialect/postgresql · high confidence
Added SQL Server DCL and DDL statement models
The SQL Server dialect parser now includes new statement models for Data Control Language (DCL) and Data Definition Language (DDL) operations. This adds support for parsing GRANT, REVOKE, and DENY USER statements, as well as login management commands (CREATE, ALTER, DROP LOGIN) and user switching (SET USER). Additionally, it introduces models for table variable declarations (DECLARE VARIABLE), service management (CREATE, ALTER, DROP SERVICE), and updating statistics (UPDATE STATISTICS).
parser/sql/statement/dialect/sqlserver · high confidence
Added smart ANTLR4 rebuild script with multi-branch state tracking
A new shell script, \scripts/smart-antlr-rebuild.sh\, has been added to help developers efficiently recompile ShardingSphere ANTLR4 modules. The script intelligently identifies modules containing \.g4\ grammar files and uses Maven to compile them, ensuring import grammars are resolved. It introduces a state-tracking mechanism via a \.antlr\_last\_commit\ file that records the last successful build commit per branch, allowing subsequent runs to skip unchanged modules and only rebuild when necessary. This supports multi-branch workflows by preserving build state across different branches, reducing redundant compilation time during development.
scripts · high confidence
Basic batch query support for Firebird Proxy
The Firebird protocol dialect now supports basic batch operations. This change introduces a new batch message command packet to parse batch parameter values and null bits, along with a batch registry to manage batch statement metadata per connection. Users can now execute batched queries against Firebird databases through the proxy.
shardingsphere-database-protocol-firebird · high confidence
Broadcast feature adds table routing engine and metadata aggregation
The broadcast module now includes a dedicated routing engine (BroadcastTableBroadcastRouteEngine) that routes SQL statements to all data sources for specified broadcast tables, and a schema table aggregation reviser (BroadcastSchemaTableAggregationReviser) to handle metadata aggregation for these tables. Additionally, a new rule attribute (BroadcastDataNodeRuleAttribute) manages the mapping between logic tables and their corresponding data nodes across all data sources, ensuring broadcast tables are correctly identified and routed.
shardingsphere-broadcast-core · high confidence
Data masking rule configuration and algorithms
The data masking feature now supports configuring masking rules via Bean Validation, enforcing constraints such as unique table names and valid algorithm SPI types. Several new masking algorithms are available, including KEEP\_FIRST\_N\_LAST\_M, KEEP\_FROM\_X\_TO\_Y, MASK\_FIRST\_N\_LAST\_M, MASK\_FROM\_X\_TO\_Y, MASK\_AFTER\_SPECIAL\_CHARS, MASK\_BEFORE\_SPECIAL\_CHARS, MD5, and GENERIC\_TABLE\_RANDOM\_REPLACE, allowing users to apply various masking strategies to sensitive data.
features/mask · high confidence
Database timestamp service with dialect-specific SQL providers
The database time-service type now includes a \DatabaseTimestampService\ that retrieves the current timestamp by executing database-specific SQL queries. This is implemented via a \TimestampLoadingSQLProvider\ SPI with dialect-specific implementations for MySQL (\SELECT NOW()\), Oracle (\SELECT sysdate FROM DUAL\), PostgreSQL (\SELECT NOW()\), and SQLServer (\SELECT GETDATE()\). The service initializes a data source from configuration properties and loads the timestamp, throwing a \DatetimeLoadingException\ if the query fails. Tests verify the service's ability to fetch timestamps from a real database connection and handle SQL errors appropriately.
kernel/time-service/type/database · high confidence
Enable OpenTelemetry tracing for JDBC operations
The OpenTelemetry tracing plugin now includes configuration to capture distributed traces for JDBC-related activities. A new advisor configuration file defines pointcuts on key ShardingSphere classes, including CommandExecutorTask, ShardingSphereStatement, ShardingSpherePreparedStatement, ShardingSphereSQLParserEngine, and JDBCExecutorCallback, linking them to specific OpenTelemetry advice classes. Additionally, the plugin lifecycle service is registered via the standard Java SPI mechanism, ensuring the tracing plugin is properly initialized and managed by the agent.
agent/plugins/tracing/type/opentelemetry/src/main/resources · high confidence
Expanded Apache Doris SQL parsing support for administrative and maintenance operations
The Doris SQL parser now recognizes a broad set of Data Administration Language (DAL) statements, enabling the system to parse complex administrative and maintenance commands. This includes operations for managing storage and resources (CREATE/ALTER/DROP RESOURCE, CREATE/ALTER/DROP SQL BLOCK RULE, CREATE/ALTER WORKLOAD GROUP), cluster health and repair (ADMIN REPAIR, ADMIN CANCEL REPAIR, ADMIN CHECK TABLET, ADMIN SET TABLE STATUS/REPLICA STATUS/VERSION, ADMIN COPY TABLET, ADMIN REBALANCE DISK, ADMIN CANCEL REBALANCE DISK), data lifecycle and backups (BACKUP, CANCEL BACKUP, RECOVER, CLEAN TRASH, CLEAN PROFILE), and job management (CREATE/DROP REPOSITORY, CREATE/PAUSE/RESUME SYNC JOB, CANCEL LOAD, CANCEL TASK, SHOW LOAD WARNINGS). Users can now run these specific Doris administrative queries through the parser without encountering syntax errors.
parser/sql/statement/dialect/doris · high confidence
Expanded Oracle DDL and PL/SQL parsing support
The Oracle SQL parser now supports a significantly broader range of Data Definition Language (DDL) statements and PL/SQL constructs. Users can now parse Oracle-specific features including CREATE SCHEMA, CREATE INDEX, CREATE TYPE BODY, and ALTER TABLE EXCHANGE PARTITION. Additionally, the parser handles Oracle procedure parsing and binding, package routine names, parenthesized WITH queries, and qualified PL/SQL collection types, improving compatibility with complex Oracle database schemas and scripts.
shardingsphere-parser-sql-engine-oracle · high confidence
Firebird Proxy adds support for batch operations and BLOB handling
The Firebird dialect in the ShardingSphere Proxy now supports batch statement execution and BLOB data types. Users can create, execute, cancel, and release batch statements via new command executors (Create, Execute, Cancel, Release, Message) that manage batch state and parameter values. Additionally, BLOB operations are fully implemented, including creating, opening, closing, canceling, seeking (not yet supported), and reading/writing segments via dedicated executors and in-memory caches (FirebirdBlobReadCache and FirebirdBlobWriteCache) that handle segment buffering and handle lifecycle management.
shardingsphere-proxy-frontend-firebird · high confidence
Firebird dialect connector implementation
This change introduces the Firebird dialect connector, enabling ShardingSphere to connect to and manage Firebird databases. It includes a JDBC URL parser to extract connection details, a metadata loader that registers blob columns and non-fixed-length column sizes, and system database definitions for Firebird's system schemas (such as system\_tables and system\_lobs). The implementation also provides database metadata for identifier case policies (upper-case normalization), schema options, transaction behaviors, and function options (e.g., unparenthesized functions like CURRENT\_DATE), along with service provider registrations and YAML schema definitions for monitoring tables like MON$ATTACHMENTS.
(repo-wide) · high confidence
Firebird dialect exception mapping and error handling
Users connecting to Firebird databases now receive specific, structured error messages for common protocol issues such as invalid batch handles, oversized batches, BLOB operation failures, and transaction limits. This change introduces a new \FirebirdDialectExceptionMapper\ that translates internal ShardingSphere exceptions into Firebird-specific vendor codes and SQL states, ensuring that error details like statement handles or BLOB IDs are preserved in the feedback provided to the application.
database/exception/dialect/firebird · high confidence
Firebird dialect support for proxy admin and query operations
This change adds the Firebird-specific backend implementation for the ShardingSphere Proxy, enabling proper handling of administrative commands and query metadata for Firebird databases. It introduces a \FirebirdAdminExecutorCreator\ to route \SET\ and \SHOW\ statements to dialect-specific executors, including a \FirebirdSetVariableAdminExecutor\ that manages session variables and character sets (via \FirebirdCharsetVariableProvider\ and \FirebirdCharacterSets\), and a \FirebirdShowVariableExecutor\ that returns server version information. Additionally, it provides a \FirebirdQueryHeaderBuilder\ to construct query result headers using \ShardingSphereResultSetMetaData\ and a \FirebirdStatementMemoryStrictlyFetchSizeSetter\ to enforce memory-strict fetch size behavior. These components are registered via Java SPI service files and include corresponding unit tests.
proxy/backend/dialect/firebird · high confidence
Groovy-based inline expression parser for table routing
Added the GroovyInlineExpressionParser implementation in the shardingsphere-infra-expr-type-groovy module, enabling users to define complex inline expressions (such as ranges, arrays, and dynamic placeholders) for table routing using Groovy syntax. The parser includes a configurable Caffeine-based script cache to optimize performance and handles thread-safe evaluation of expressions with arguments.
infra/expr/type/groovy · high confidence
HikariCP data source pool implementation added
This change introduces the HikariCP-specific implementation for the data source pool infrastructure. It adds the HikariDataSourcePoolActiveDetector to check for active connections via MXBean, HikariDataSourcePoolMetaData to define default properties (such as connectionTimeout, maxLifetime, and pool sizes), property synonyms (e.g., 'url' to 'jdbcUrl'), and transient fields, and HikariDataSourcePoolPropertiesContentValidator to enforce validation rules (e.g., minimum connection timeout of 250ms). The implementation is registered via SPI services and includes corresponding unit tests for the creator, detector, metadata, and validator components.
infra/data-source-pool/type/hikari · high confidence
Initial Apache Doris SQL dialect support
The parser now supports the Apache Doris SQL dialect, enabling the parsing of a wide range of Doris-specific SQL statements including DDL (e.g., CREATE TABLE with multi-range partitioning, ALTER TABLE), DML (INSERT, REPLACE), and various administrative commands (e.g., ADMIN REPAIR, BACKUP, SYNC JOB). This addition includes the necessary grammar definitions, lexer/parser implementations, and visitor logic to recognize and process these queries.
parser/sql/engine/dialect/doris · high confidence
Initial Firebird SQL dialect support
Added a new SQL parser dialect for Firebird, enabling the system to parse and understand Firebird-specific SQL syntax. This includes grammar definitions for Data Definition Language (DDL) statements such as CREATE TABLE, ALTER TABLE, and CREATE DOMAIN, as well as Data Manipulation Language (DML) statements like SELECT, INSERT, UPDATE, DELETE, and MERGE. The implementation also covers Data Control Language (DCL) for GRANT/REVOKE, Transaction Control Language (TCL) for COMMIT/ROLLBACK, and specific Firebird features such as BLOB data types, FIRST/SKIP pagination, and column nullability constraints.
database/protocol/dialect/opengauss, parser/sql/engine/dialect/clickhouse, parser/sql/engine/dialect/firebird · high confidence
Initial Firebird dialect support in ShardingSphere Proxy
This change introduces the Firebird protocol dialect to the ShardingSphere Proxy frontend, enabling the proxy to accept and process connections from Firebird clients. It implements the full authentication handshake (including SRP and legacy authentication methods), a command execution engine to translate Firebird wire protocol packets into internal commands, and a command executor factory to route operations such as statement preparation, execution, fetching, transaction management, and BLOB handling to the appropriate backend handlers.
proxy/frontend/dialect/firebird · high confidence
Initial Hive SQL parser implementation
The Hive SQL parser is now available, enabling the system to parse and understand Hive-specific SQL syntax. This addition includes support for Data Definition Language (DDL) commands such as CREATE, ALTER, and DROP for databases, tables, views, and indexes, as well as Data Manipulation Language (DML) operations like SELECT, INSERT, UPDATE, and DELETE. It also covers Data Administration Language (DAL) statements for managing metadata (e.g., SHOW TABLES, DESCRIBE) and Transaction Control Language (TCL) for managing transactions. This allows users to execute Hive-compatible queries through the parser.
database/connector/dialect/h2/src/main, database/protocol/dialect/firebird, parser/sql/engine/dialect/hive · high confidence
Initial MCP API definition for ShardingSphere
This release introduces the foundational API for the ShardingSphere MCP (Model Context Protocol) integration, defining the core interfaces and data structures that enable external AI agents to interact with the database. The API exposes a unified \MCPHandlerProvider\ SPI to register and retrieve handlers for resources, tools, and completions, while establishing a strict \MCPRequestContext\ to pass session identity and transport type during synchronous invocations. It standardizes capability descriptors for resources (including URI templates and annotations), tools (with input/output schemas and safety hints), and prompts, alongside dedicated exception types for handling invalid requests, timeouts, and transaction errors, providing a stable contract for runtime implementation and extension.
mcp/api · high confidence
Initial MCP core implementation with structured error handling and session management
This change introduces the core components for the ShardingSphere MCP (Model Context Protocol) integration. It adds a per-session fixed-window rate limiter for completion requests to prevent abuse, and a structured error conversion system that maps internal exceptions to standardized MCP error payloads with recovery guidance. The update also includes an in-memory workflow session store for managing multi-step SQL execution contexts, a governance metadata query service that safely exposes database topology while redacting sensitive credentials, and specific payload models for SQL execution results and runtime database validation.
shardingsphere-mcp-core · high confidence
Initial PostgreSQL protocol support in the proxy frontend
This change introduces the core PostgreSQL dialect module for the proxy, adding the \PostgreSQLFrontendEngine\ and its associated components. It implements the PostgreSQL wire protocol handshake, including SSL negotiation and MD5/password authentication, and provides the command execution engine to handle standard PostgreSQL commands such as simple queries, extended protocol operations (Parse, Bind, Describe, Execute, Sync, Close), and transaction management. This enables the proxy to accept and process connections from PostgreSQL clients.
proxy/frontend/dialect/postgresql · high confidence
Initial SQL Server dialect parser support
The SQL Server dialect parser is now available, enabling the system to parse SQL Server-specific syntax. This includes support for Data Definition Language (DDL) statements such as CREATE/ALTER/DROP TABLE, INDEX, DATABASE, FUNCTION, PROCEDURE, VIEW, TRIGGER, SEQUENCE, SERVICE, and SCHEMA, as well as Data Manipulation Language (DML) statements like SELECT, INSERT, UPDATE, DELETE, and MERGE. The parser also handles Data Control Language (DCL) statements (GRANT, REVOKE, DENY), Transaction Control Language (TCL) statements (BEGIN, COMMIT, ROLLBACK, SAVEPOINT), and session SET commands (QUOTED\_IDENTIFIER, TEXTSIZE, IMPLICIT\_TRANSACTIONS). Additionally, it supports SQL Server-specific features such as table variables, FILETABLE, query hints (MAXDOP, FORCE SINGLE NODE PLAN, FOR TIMESTAMP, QUERYTRACEON), and window functions.
parser/sql/engine/dialect/sqlserver · high confidence
Initial implementation of the data masking rule engine
This change introduces the core components for the data masking feature, including the MaskRule which manages table and algorithm configurations, and MaskTable which handles column-level masking logic. It enables case-insensitive lookup of mask algorithms and tables, supports partial rule updates for dynamic configuration changes, and provides YAML configuration swapping to allow users to define and update masking rules via YAML files.
shardingsphere-mask-core · high confidence
Initial launch of ShardingSphere MCP Server runtime and transport layer
This change introduces the core runtime infrastructure for the ShardingSphere Model Context Protocol (MCP) server. The \MCPRuntimeLauncher\ now bootstraps the server, supporting both HTTP and STDIO transport modes, and provides detailed startup diagnostics including endpoint URLs and session attribution details. The implementation includes a \SessionManagedStdioTransportProvider\ for managing STDIO session lifecycles and an \OriginHeaderConstraint\ to enforce security policies on HTTP requests. Additionally, the bootstrap module adds tool elicitation capabilities, featuring a \MCPToolElicitationHandler\ and \MCPToolClarificationPolicy\ to manage interactive clarification forms for planning workflows, and a \MCPResourceLinkCandidateCollector\ to standardize how resource links are extracted and prioritized from tool payloads.
shardingsphere-mcp-bootstrap · high confidence
Initial release of ShardingSphere MCP distribution with HTTP and stdio transport support
This change introduces the initial ShardingSphere MCP distribution, providing the necessary launch scripts (start.sh, start.bat, docker-entrypoint.sh) and configuration files to run the server. Users can now deploy the MCP server in two modes: HTTP (defaulting to localhost:18088 for local use, or 0.0.0.0:18088 for Docker) and stdio. The distribution enforces a Java 21+ runtime requirement, includes a logback configuration for structured logging, and bundles the required license and notice files for compliance.
distribution/mcp · high confidence
Initial repository structure and governance configuration
The repository is initialized with foundational governance and development files, including \.asf.yaml\ for Apache Software Foundation notifications and GitHub settings, \.codecov.yml\ for code coverage reporting, \.dockerignore\ and \.gitattributes\ for build and version control hygiene, and \.licenserc.yaml\ for license header management. It also introduces \AGENTS.md\ as the primary Codex development guide, \AI\_POLICY.md\ outlining rules for AI-assisted contributions, and \CONTRIBUTING.md\ detailing the process for reporting bugs and submitting pull requests.
(repo-wide) · high confidence
Introduce AgentBuilderFactory for agent initialization
Added AgentBuilderFactory to centralize the creation of the ByteBuddy-based agent builder. This factory configures the agent's transformation logic, including type validation, exclusion of synthetic classes and internal agent packages, and the application of advisor and plugin configurations, providing a standardized entry point for initializing the Java agent.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/builder · high confidence
Introduce AgentPath utility for locating the agent root directory
A new AgentPath utility class has been added to the agent core module. This class provides a static method to determine the root path of the agent by resolving the location of the agent JAR file from the classpath, ensuring the system can correctly identify its installation directory at runtime.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/path · high confidence
Introduce Atomikos as the default XA transaction manager provider
This change adds the Atomikos-based implementation for the XA transaction manager SPI, making it the new default provider for distributed XA transactions. The \AtomikosTransactionManagerProvider\ class now initializes the Atomikos \UserTransactionService\, handles resource registration and recovery, and manages transaction enlistment. Configuration defaults are set via \transactions.properties\ (e.g., a 300-second JTA timeout and 10,000 max active transactions), and the provider is registered via the \META-INF/services\ file. Users relying on XA transactions will now use Atomikos by default unless explicitly configured otherwise.
kernel/transaction/type/xa/provider/atomikos · high confidence
Introduce CDC job API and core execution components
This change adds the core implementation for Change Data Capture (CDC) jobs within the data pipeline, introducing the \CDCJobAPI\ to handle job creation and configuration management. It defines the \CDCJobType\ and \CDCJobId\ to identify streaming jobs, along with \CDCJobConfiguration\ and its YAML swapper for persisting job settings. The diff also includes the \CDCImporter\ for processing change records, \CDCJobItemContext\ for managing job state and progress, and supporting classes like \CDCConnectionContext\ and \CDCAckPosition\ to handle connection state and acknowledgment positions.
kernel/data-pipeline/scenario/cdc/core · high confidence
Introduce ConsistencyCheckJobId for type-safe job identification
The consistency-check module now includes a dedicated ConsistencyCheckJobId class that implements the PipelineJobId interface. This class manages job identification by combining a context key, a parent job ID, and a sequence number, ensuring that job IDs are generated and parsed consistently within the data pipeline's consistency-check scenario.
shardingsphere-data-pipeline-scenario-consistency-check · high confidence
Introduce DistSQL handlers for single table management
This change adds the DistSQL handler implementations for the single-table feature, enabling users to manage single tables via SQL commands. It introduces executors for loading (\LOAD SINGLE TABLE\), unloading (\UNLOAD SINGLE TABLE\), and setting the default storage unit (\SET DEFAULT SINGLE TABLE STORAGE UNIT\). It also adds query executors to show currently loaded single tables (\SHOW SINGLE TABLES\), unloaded tables (\SHOW UNLOADED SINGLE TABLES\), and the default storage unit (\SHOW DEFAULT SINGLE TABLE STORAGE UNIT\). Additionally, it provides a converter to generate DistSQL statements from the single rule configuration and registers these components via SPI service files.
kernel/single/distsql/handler · high confidence
Introduce DistSQL statement models for single table management
This change adds the DistSQL statement definitions and segment models required to manage single tables, including loading, unloading, and configuring default storage units. Specifically, it introduces \SingleTableSegment\ to represent table references (with optional schema), \LoadSingleTableStatement\ and \UnloadSingleTableStatement\ for adding and removing single tables from the single-table rule, \SetDefaultSingleTableStorageUnitStatement\ for setting the default storage unit, and query statements (\ShowSingleTablesStatement\, \ShowUnloadedSingleTablesStatement\, \ShowDefaultSingleTableStorageUnitStatement\) to inspect the current single-table configuration. Tests are included to verify the segment's equality, hashing, and string representation logic.
kernel/single/distsql/statement · high confidence
Introduce DistSQL statements for SQL Federation rule configuration
This change adds the DistSQL statement classes and segments required to manage SQL Federation rules, specifically introducing \AlterSQLFederationRuleStatement\ to allow users to configure the federation provider type, enable all-query federation, and set execution plan cache options (initial capacity and maximum size). It also adds \ShowSQLFederationRuleStatement\ to retrieve current federation rule settings and \CacheOptionSegment\ to represent cache configuration parameters, along with corresponding unit tests for the alter statement.
kernel/sql-federation/distsql/statement · high confidence
Introduce EnumerableScan and LogicalScanRelRewriter for SQL federation compilation
The SQL federation compiler now includes a new EnumerableScan physical operator and a LogicalScanRelRewriter. EnumerableScan handles the implementation of table scans by generating SQL strings via the dialect factory and passing dynamic parameters to the underlying federation table implementation. The LogicalScanRelRewriter transforms standard Calcite LogicalTableScan nodes into LogicalScan nodes, enabling the federation engine to process scan operations with specific database type context.
shardingsphere-sql-federation-compiler · high confidence
Introduce FileLoggingPluginLifecycleService for file-based logging plugin initialization
A new FileLoggingPluginLifecycleService has been added to the file logging plugin module. This service implements the PluginLifecycleService interface to manage the startup phase of the file logging plugin, specifically by setting the enhanced-for-proxy context flag via PluginContext when the plugin starts.
agent/plugins/logging/type/file/src/main/java · high confidence
Introduce Global Clock rule for distributed transaction timestamping
Adds the core implementation for the Global Clock rule in the kernel module, enabling users to configure a global timestamp provider (via the \GlobalClockProvider\ SPI) to coordinate distributed transactions. This change introduces the \GlobalClockTransactionHook\ to intercept transaction lifecycle events (begin, commit, rollback) and inject timestamps into database connections, with an initial executor implementation for openGauss that sends snapshot and commit timestamps via SQL statements. The feature includes the rule configuration model, YAML serialization support, and SPI registrations to wire the hook and builders into the ShardingSphere runtime.
kernel/global-clock/core · high confidence
Introduce JDBC-based standalone repository with H2, MySQL, and HSQLDB support
Users can now persist ShardingSphere standalone mode configuration to a relational database using a new JDBC repository implementation. This change adds a \JDBCRepository\ that manages connection pooling via HikariCP and loads database-specific SQL statements (for H2, MySQL, and HSQLDB) from XML configuration files. It exposes configuration properties for the JDBC URL, username, password, and provider type, allowing users to switch their standalone persistence backend from the default in-memory store to a durable database solution.
mode/type/standalone/repository/provider/jdbc · high confidence
Introduce Local TSO Provider for Global Clock
A new LocalTSOProvider implementation is added to the global-clock module, providing a local timestamp oracle (TSO) that uses an in-memory atomic counter instead of external time sources. This provider is registered via the Java SPI mechanism (META-INF/services) under the type key "TSO.local" and is marked as the default provider, meaning it will be automatically selected when no specific TSO type is configured. The implementation ensures monotonic timestamp generation through incrementing atomic longs, supporting local testing or environments where distributed timestamp coordination is not required.
kernel/global-clock/type/tso/provider/local · high confidence
Introduce MCP Registry metadata validation and preparation tool
A new command-line utility, MCPRegistryMetadataCommand, has been added to the MCP registry module to manage and validate the server.json metadata file. This tool allows users to prepare metadata by injecting version and identifier fields, or to validate the file against the official MCP Registry schema. It enforces strict structural requirements, ensuring the server name matches the published ShardingSphere MCP identity, that exactly one stdio and one streamable-http OCI package are present, and that transport configurations (including runtime hints and ports for streamable-http) are correctly defined. It also supports optional validation of a linked Dockerfile.
shardingsphere-mcp-registry · high confidence
Introduce MCP bootstrap and YAML configuration support
The MCP module now includes a bootstrap entry point and a complete YAML-based configuration system. Users can launch the MCP runtime via the \MCPBootstrap\ class, which loads settings from a YAML file (defaulting to \conf/mcp-http.yaml\) and supports an optional command-line argument to specify a custom configuration path. The configuration model supports both HTTP and STDIO transport types, with HTTP settings allowing customization of the bind host, port, endpoint path, and session attribution headers. Runtime database connections are configured via JDBC properties, and the system enforces validation on all configuration fields to ensure correctness at startup.
mcp/bootstrap · high confidence
Introduce MCP core completion, context, and handler infrastructure
The mcp/core module now provides the foundational runtime for Model Context Protocol interactions, introducing a completion service that supports metadata (databases, schemas, tables, columns, indexes, sequences, storage units) and workflow plan ID auto-completion with prefix/contains matching and rate limiting. A new runtime request context propagates session identity, transport type, and database capabilities, while a core handler provider registers the primary tool handlers (search metadata, validate runtime database, execute query/explain/update, workflow execution/validation) and resource handlers exposing server capabilities, guidance, runtime status, and hierarchical database/schema metadata via URI templates.
mcp/core · high confidence
Introduce MCP database capability detection and configuration validation
The MCP support module now includes a structured capability detection system that identifies per-database features such as EXPLAIN support, sequence metadata queries, and transaction capabilities for dialects including MySQL, PostgreSQL, Oracle, and others. Additionally, MCP configuration validation is enforced using Apache BVal, ensuring that user-provided settings are checked against defined constraints before execution.
mcp/support · high confidence
Introduce MCP feature plugin for readwrite-splitting rule and status management
This change adds the Java implementation for the readwrite-splitting MCP feature plugin, exposing new tools and resources to manage readwrite-splitting configurations. Users can now use the \database\_gateway\_plan\_readwrite\_splitting\_rule\ and \database\_gateway\_plan\_readwrite\_splitting\_status\ tools to plan rule and status changes, and query resources such as rule lists, rule details, status lists, rule counts, and available load-balance algorithm plugins via specific URI templates. The plugin also provides completion support for load-balance algorithm types and registers the necessary workflow definitions and DistSQL statement classifiers to handle these operations.
mcp/features/readwrite-splitting/src/main/java/org/apache/shardingsphere/mcp/feature/readwritesplitting · high confidence
Introduce MCP integration for database masking rules
This change adds the initial Model Context Protocol (MCP) support for the ShardingSphere mask feature. It registers the \MaskMCPHandlerProvider\ via the Java SPI service file and defines the \mcp-descriptor-mask.yaml\ configuration, which exposes resources for listing mask algorithms and rules, a \plan\_mask\_rule\ prompt, and the \database\_gateway\_plan\_mask\_rule\ tool. These components enable AI agents to discover available masking algorithms, inspect existing rule configurations for specific databases and tables, and generate reviewable DistSQL artifacts for masking workflows without executing them directly.
mcp/features/mask · high confidence
Introduce MCP support module with database capability, metadata, and workflow models
The new \shardingsphere-mcp-support\ module provides the foundational support layer for the Model Context Protocol (MCP) integration. It introduces \MCPDatabaseCapabilityProvider\ to expose database-specific capabilities (such as supported object types, statement classes, and transaction control) via a SPI-based facade, and \RequestScopedMetadataContext\ to lazily load and cache schema, column, index, and sequence metadata for the current request. The module also defines a set of model classes for the MCP workflow—\AlgorithmCandidate\, \AlgorithmPropertyRequirement\, \SecretReferenceValue\, \ValidationSection\, and \WorkflowIssue\—to structure algorithm recommendations, property requirements, and validation results. Additionally, it standardizes protocol-facing payloads through \MCPDatabaseCapabilityPayload\, \MCPItemsPayload\, \MCPMapPayload\, and \ShardingSphereMCPResourceMetadata\ to ensure consistent serialization of database capabilities, item lists, and resource metadata.
shardingsphere-mcp-support · high confidence
Introduce MCP workflow for broadcast table rules
This change adds a new Model Context Protocol (MCP) feature for managing broadcast table rules, providing a structured workflow for planning and validating rule changes. Users can now inspect existing broadcast rules and rule counts via MCP resources, and use the \database\_gateway\_plan\_broadcast\_rule\ tool to plan CREATE or DROP operations for specific tables. The implementation includes a planning service that generates DistSQL artifacts, a validation service to ensure rule state consistency before execution, and handler providers to expose these capabilities through the MCP interface.
mcp/features/broadcast/src/main/java/org/apache/shardingsphere/mcp/feature/broadcast · high confidence
Introduce MCP workflow support for Shadow database rules and algorithms
This change adds the Java implementation for the Shadow feature within the Model Context Protocol (MCP) integration. It introduces a handler provider that registers resource handlers for inspecting shadow rules, algorithms, and storage units, along with tool handlers for planning workflows to create, alter, and drop shadow rules and default shadow algorithms. The update includes specific workflow request models and services that generate the corresponding DistSQL statements (CREATE/ALTER/DROP SHADOW RULE, CREATE/ALTER/DROP DEFAULT SHADOW ALGORITHM) and provide algorithm recommendation logic based on available plugin types like SQL\_HINT, VALUE\_MATCH, and REGEX\_MATCH.
mcp/features/shadow/src/main/java/org/apache/shardingsphere/mcp/feature/shadow · high confidence
Introduce MCP workflow support for mask rules
This change adds the Mask feature module to the Model Context Protocol (MCP) integration, enabling users to manage data masking rules through a guided workflow. The module registers a new tool (\database\_gateway\_plan\_mask\_rule\) that plans CREATE and DROP operations for mask rules, along with resource handlers to list available mask algorithms and existing rules, and a completion handler to suggest algorithm types. It includes services for inspecting current mask configurations, recommending algorithms based on Proxy capabilities, validating workflow steps, and generating the corresponding DistSQL artifacts for execution.
mcp/features/mask/src/main/java/org/apache/shardingsphere/mcp/feature/mask · high confidence
Introduce MCP-based encrypt rule workflow and tooling
This change adds the initial implementation of the Encrypt feature for the Model Context Protocol (MCP) module. It introduces a new \EncryptFeatureDefinition\ and \EncryptMCPHandlerProvider\ that register resource handlers for browsing available encrypt algorithms and rules, a completion handler for algorithm type suggestions, and a \PlanEncryptRuleToolHandler\ that exposes a \database\_gateway\_plan\_encrypt\_rule\ tool. This tool allows users to plan encrypt rule configurations by specifying algorithm types, query capabilities (decrypt, equality filter, like), and column mappings, with the service layer handling algorithm recommendation, property template validation, and masked property previews for secrets.
mcp/features/encrypt/src/main/java/org/apache/shardingsphere/mcp/feature/encrypt · high confidence
Introduce MySQL protocol dialect constants and packet structures
This change adds the foundational constants and packet classes for the MySQL database protocol dialect, including authentication methods, binary column types, binlog event types and flags, capability flags, character sets, and connection phases. It also introduces the base MySQL packet abstraction, binlog event packet hierarchy, and a Netty inbound handler for managing MySQL sequence IDs, establishing the core protocol infrastructure for MySQL communication.
database/protocol/dialect/mysql · high confidence
Introduce Narayana-based XA transaction manager provider
This change adds a new implementation of the XA transaction manager provider using the Narayana JTA engine. It introduces the \NarayanaXATransactionManagerProvider\ to manage the Narayana transaction lifecycle, including initialization, resource enlistment, and cleanup, and adds \DataSourceXAResourceRecoveryHelper\ to enable transaction recovery by retrieving XIDs from the database. The provider is registered via the standard Java SPI mechanism, allowing users to configure Narayana as their XA transaction manager.
kernel/transaction/type/xa/provider/narayana · high confidence
Introduce PluginLifecycleServiceManager for centralized plugin lifecycle management
Added a new PluginLifecycleServiceManager class that centralizes the initialization and shutdown of agent plugins. This manager handles starting plugins by loading them via the AgentServiceLoader and registering a JVM shutdown hook to ensure all plugins and their associated JAR files are properly closed when the agent terminates.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin · high confidence
Introduce SPI for key generation algorithms
Added the \KeyGenerateAlgorithm\ SPI interface and its corresponding \PluginTypeAndClassMapper\ registration in the key-generator SPI module. This enables users to define and register custom key generation algorithms via the standard SPI mechanism, with the system now recognizing the \KEY\_GENERATE\_ALGORITHM\ type for plugin discovery.
infra/algorithm/type/key-generator/spi · high confidence
Introduce SQL Parser Rule with configurable cache options
The SQL parser module now exposes a configurable \SQLParserRule\ that manages caching for SQL statements and parse trees. Users can define cache settings (initial capacity and maximum size) via YAML configuration under the \!SQL\_PARSER\ rule key, allowing control over memory usage for parsing operations. The rule includes default builder implementations and integrates with the global rule builder framework.
kernel/sql-parser/core · high confidence
Introduce SQL Translator API and SPI
This change introduces the public API for the SQL Translator feature, defining the \SQLTranslator\ SPI interface that extends \ShardingSphereAlgorithm\ to handle SQL translation with context, query, and rule metadata. It adds the \SQLTranslatorRuleConfiguration\ class for configuring the translator type and properties, including validation that the specified SPI type exists. Additionally, it defines the \SQLTranslatorContext\ for holding translated SQL and parameters, and establishes the \SQLTranslationException\ hierarchy (including \UnsupportedTranslatedDatabaseException\) for error handling. Tests are included to validate the rule configuration.
kernel/sql-translator/api · high confidence
Introduce SQL Translator global rule with configurable translation behavior
This change adds the SQL Translator rule to the kernel, enabling SQL translation between different database types. Users can now configure the translator via YAML using the \!SQL\_TRANSLATOR\ tag, specifying the translator \type\, \props\, and a new \useOriginalSQLWhenTranslatingFailed\ flag (defaulting to \true\) to control whether the original SQL is preserved or an exception is thrown if translation fails. The rule integrates with the global rule builder and SPI mechanisms, registering itself with a specific order to ensure it executes at the correct stage in the query processing pipeline.
kernel/sql-translator/core · high confidence
Introduce Seata AT distributed transaction integration
This change adds the Seata AT (Automatic Transaction) integration module to the ShardingSphere kernel, enabling users to manage distributed transactions across multiple data sources using the Seata framework. The implementation includes the \SeataATShardingSphereTransactionManager\ to handle transaction lifecycle (begin, commit, rollback) and a \SeataTransactionalSQLExecutionHook\ to manage XID context propagation across threads. It also introduces specific exception types for configuration and state errors, along with the necessary SPI service registrations to wire these components into the ShardingSphere transaction infrastructure.
kernel/transaction/type/base/seata-at · high confidence
Introduce SingleRuleConfiguration API with validation
The \kernel/single/api\ module now includes the \SingleRuleConfiguration\ class, which defines the configuration structure for the Single rule, including a collection of tables and an optional default data source. Bean validation constraints (\@NotNull\, \@NotBlank\) have been added to enforce that table names are present and non-empty, ensuring configuration integrity. A corresponding test suite verifies both valid configurations and the rejection of invalid ones (null or empty table names).
kernel/single/api · high confidence
Introduce TimestampService SPI and rule configuration with validation
The time-service API now defines a \TimestampService\ SPI interface and a corresponding \TimestampServiceRuleConfiguration\ that enforces validation constraints (non-blank type, valid SPI implementation) using Bean Validation. This allows users to configure the timestamp service rule with a specific type that must implement the new SPI, ensuring type safety and proper service discovery at runtime.
kernel/time-service/api · high confidence
Introduce TimestampServiceRule and its builder infrastructure
This change adds the core implementation for the Timestamp Service rule within the kernel module. It introduces the \TimestampServiceRule\ class, which delegates timestamp retrieval to a pluggable \TimestampService\ SPI, along with the \TimestampServiceRuleBuilder\ and \DefaultTimestampServiceConfigurationBuilder\ to construct the rule from configuration. The service is registered via SPI files and assigned a specific execution order (1100), and unit tests are added to verify the builder correctly instantiates the rule and resolves the underlying timestamp service.
kernel/time-service/core · high confidence
Introduce XA transaction SPI interfaces and SingleXAResource wrapper
This change adds the core SPI components for XA transaction support in the kernel. It introduces the \SingleXAResource\ class, which wraps a standard \XAResource\ and delegates all transaction operations (such as commit, rollback, prepare, and recover) to the underlying resource, while also mapping any \XAException\ errors. Additionally, it defines the \XATransactionManagerProvider\ interface, which serves as the SPI contract for initializing the transaction manager, registering and removing recovery resources, enlisting single XA resources, and managing the transaction manager lifecycle. A corresponding test suite is included to verify the delegation behavior of \SingleXAResource\.
kernel/transaction/type/xa/spi · high confidence
Introduce advice executor factory and factory classes
The agent core module now includes a new \AdviceExecutorFactory\ that dynamically selects the appropriate advice executor (constructor, static, or instance method) based on the method signature and plugin type, while an \AdviceFactory\ handles the creation and caching of advice instances using the correct class loader context. This change establishes the core infrastructure for applying agent advice to target methods.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/advisor/executor · high confidence
Introduce centralized plugin configuration loading
Added a new \PluginConfigurationLoader\ class that provides a static method to load plugin configurations from the \conf/agent.yaml\ file located in the agent's root directory. This component handles reading the YAML file and swapping the raw data into \PluginConfiguration\ objects, serving as the entry point for the agent's plugin configuration system.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/config · high confidence
Introduce core agent plugin infrastructure and data source advice
The agent core module now includes the foundational classes required for plugin execution and configuration validation. This adds abstract advice base classes (AbstractInstanceMethodAdvice, AbstractStaticMethodAdvice) that delegate plugin enablement checks to a new PluginContext, which retrieves the ContextManager from either the Proxy or DataSource context. A new ShardingSphereDataSourceAdvice intercepts ShardingSphereDataSource creation and closure to manage the ShardingSphereDataSourceContextHolder, ensuring the agent can correctly associate metrics and operations with specific data sources. Additionally, a common-advisors.yaml configuration file registers this advice, and supporting utilities (PluginServiceLoader, SQLStatementUtils, PluginConfigurationValidator) are added to handle SPI loading, SQL statement typing, and configuration validation.
agent/plugins/core/src/main · high confidence
Introduce core authentication and authority rule components
This change adds the foundational classes for the authority module, including the \Authenticator\ interface and factory for pluggable authentication methods, the \AuthorityRule\ for managing user privileges, and the \AuthorityChecker\ and \AuthoritySQLExecutionChecker\ for enforcing database access control. It also introduces YAML configuration support via \YamlAuthorityRuleConfiguration\ and registers these components as global rules and SQL execution checkers via SPI, establishing the core logic for user authentication and authorization.
kernel/authority/core · high confidence
Introduce core database protocol abstractions and codec infrastructure
This change adds the foundational classes for the database protocol layer in \database/protocol/core\, including the \PacketCodec\ Netty handler, the \DatabasePacketCodecEngine\ interface, and core packet models like \DatabasePacket\, \BinaryRow\, and \BinaryCell\. It also introduces protocol constants and server info management via \DatabaseProtocolServerInfo\ and \CommonConstants\, alongside tests for the codec and server info logic.
database/protocol/core · high confidence
Introduce core database protocol exception types and transformation engine
The \database/exception/core\ module now provides a centralized hierarchy for database protocol exceptions, including a new \SQLDialectException\ base class and specific subclasses for connection issues (e.g., \AccessDeniedException\, \TooManyConnectionsException\), data errors (e.g., \InvalidParameterValueException\), syntax errors (e.g., \ColumnNotFoundException\, \NoSuchTableException\), and transaction constraints. A new \SQLExceptionTransformEngine\ converts these internal exceptions into standard \java.sql.SQLException\ instances, utilizing a \SQLDialectExceptionMapper\ SPI to allow database-specific dialects to define their own conversion logic.
database/exception/core · high confidence
Introduce core migration job execution and configuration components
The migration scenario now includes the core implementation classes for managing migration jobs within the data pipeline. This adds the \MigrationJob\ entry point, \MigrationJobType\ to define the job type and consistency checking behavior, and \MigrationJobAPI\ to handle scheduling and configuration validation. It also introduces \MigrationJobConfiguration\ and \MigrationTaskConfiguration\ to define the structure of migration tasks, along with \MigrationJobExecutorCallback\ to orchestrate the execution flow, including data source transformation, table creation, and incremental dumping. Additionally, \MigrationDataConsistencyChecker\ is added to verify data integrity between source and target databases during the migration process.
kernel/data-pipeline/scenario/migration/core · high confidence
Introduce database connector core module with dialect options and registry
The database connector core module now provides foundational infrastructure for database connectivity and metadata handling. It includes a global data source registry for managing cached data sources and database tables, a default database constant for logic naming, and a set of dialect-specific option classes (DialectColumnOption, DialectConnectionOption, DialectJoinOption, DialectPaginationOption) that expose configuration flags for features like column projection labeling, three-tier storage support, join ordering, and pagination row number handling. Additionally, an interface for querying system catalog metadata is introduced to identify system tables and data compatibility.
(repo-wide) · high confidence
Introduce dialect-aware result set mapping for database connectors
The database connector core now uses a new \ResultSetMapper\ and \DialectResultSetMapper\ SPI to handle SQL result sets. This allows database-specific drivers to provide custom logic for mapping types like SMALLINT, DATE, and unhandled column types, while the core mapper delegates to these dialect implementations when available, falling back to standard JDBC methods otherwise.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/resultset · high confidence
Introduce dialect-specific alter table option models
The database connector now exposes new model classes, DialectAlterTableOption and DialectAddColumnOption, to represent database-specific alter table capabilities. These classes allow the connector to track support for merging drop columns (including syntax variations with parentheses) and to store dialect-specific options for adding columns, providing a structured way to handle alter table metadata differences across databases.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/metadata/option/altertable · high confidence
Introduce dialect-specific database privilege checking
The database connector core now includes a new SPI interface, DialectDatabasePrivilegeChecker, and a corresponding PrivilegeCheckType enum (PIPELINE, SELECT, XA, NONE) to allow database-specific implementations to verify user privileges. This enables the system to perform targeted privilege checks for different database dialects and operation types.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/checker · high confidence
Introduce dialect-specific schema option abstraction
The database connector now exposes a new \DialectSchemaOption\ interface and its \DefaultSchemaOption\ implementation within the metadata module, allowing the system to handle schema availability, default schema names, and schema semantics (such as \NATIVE\_SCHEMA\ or \DATABASE\_AS\_SCHEMA\) in a dialect-aware manner. This change provides a structured way for connectors to report and manage schema-related metadata, supporting more flexible database schema resolution across different SQL dialects.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/metadata/option/schema · high confidence
Introduce dialect-specific system database and table metadata APIs
The system metadata layer now exposes dedicated SPI interfaces and loader classes to retrieve dialect-specific system databases, schemas, and tables. Users can now query which system databases and schemas are available for a given database type via the new \DialectSystemDatabase\ and \SystemDatabase\ classes, and check if specific tables are supported as system tables using the \SystemTable\ class, which delegates to the new \DialectKernelSupportedSystemTable\ SPI.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/system · high confidence
Introduce etcd-based distributed lock implementation
Added a new \EtcdDistributedLock\ class that implements the \DistributedLock\ interface for the etcd cluster repository. This component enables distributed locking capabilities within etcd-backed cluster modes, utilizing etcd's native lock and lease clients to manage lock acquisition and release with configurable time-to-live settings.
shardingsphere-cluster-mode-repository-etcd · high confidence
Introduce exclusive operations and refactored ContextManager lifecycle
The mode/core module now supports exclusive operations via the new ExclusiveOperatorEngine and related interfaces, allowing critical metadata changes to be guarded by distributed locks to prevent conflicts. Additionally, the ContextManager has been refactored to integrate this exclusive operation engine and manage its own lifecycle through a new SPI-based ContextManagerLifecycleListener mechanism, ensuring that initialization and destruction callbacks are properly handled for both standalone and cluster modes.
mode/core · high confidence
Introduce gen-ut skill for automated unit test generation
The new gen-ut skill provides a structured workflow for generating and optimizing unit tests for Apache ShardingSphere classes. It enforces strict quality gates, including JUnit 5 standards, parameterized test analysis, and branch coverage targets, while preventing testing through layers by distinguishing between SUT-owned and collaborator-owned behavior. The skill includes Python scripts for collecting JaCoCo coverage baselines and scanning for rule violations, ensuring that generated tests meet specific coverage and structural requirements before delivery.
.codex/skills/gen-ut · high confidence
Introduce infra/rewrite/core module for unified SQL rewriting
The new \infra/rewrite/core\ module centralizes the SQL rewrite pipeline. It provides \SQLRewriteEntry\ as the main entry point, which delegates to \GenericSQLRewriteEngine\ for non-routed queries and \RouteSQLRewriteEngine\ for routed ones. The module introduces \SQLRewriteContext\ to manage SQL tokens and parameters, supporting both standard and grouped parameter builders for complex statements like inserts. It also defines the \SQLRewriteContextDecorator\ SPI for rule-specific context modifications and \ParameterRewriter\ implementations, such as \GeneratedKeyInsertValueParameterRewriter\, to handle auto-generated keys. Additionally, \SQLBuilderEngine\ abstracts the SQL construction process, and a new \max-union-size-per-datasource\ property is added to control aggregation limits in routed queries.
infra/rewrite/core · high confidence
Introduce infra/session module with new connection, transaction, and query context classes
The new infra/session module adds ConnectionContext, TransactionConnectionContext, CursorConnectionContext, and QueryContext to centralize session state management. ConnectionContext now holds the current database name, cursor context, and transaction context, while TransactionConnectionContext tracks transaction type (including XA and BASE for distributed transactions), read-write split replica routes, and transaction managers. QueryContext determines the used database from SQL statements, the current connection context, or metadata, supporting statements that do not require a specific database. Tests verify cursor management, transaction state transitions, and database resolution logic.
infra/session · high confidence
Introduce isolated class loading for agent plugins
The agent now uses a dedicated \AgentPluginClassLoader\ to load plugin code from extra JAR files, isolating plugin classes from the application's classpath. This new class loader, managed via a \ClassLoaderContext\, ensures that plugin dependencies do not conflict with the application's own libraries, providing a cleaner separation of concerns for agent extensions.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/classloader · high confidence
Introduce new CDC client for data pipeline streaming
Added a new CDC client implementation in the data pipeline module that establishes a Netty-based connection to a CDC server, handles authentication, and manages streaming data ingestion. The client supports starting, restarting, and stopping data streams, with automatic retry logic for streaming exceptions and configurable timeouts. It includes a request handler for processing server responses and data records, along with utility classes for request ID generation and protobuf conversion.
kernel/data-pipeline/scenario/cdc/client · high confidence
Introduce new PostgreSQL protocol dialect implementation
This change introduces a new, standalone PostgreSQL protocol dialect module (shardingsphere-database-protocol-dialect) that implements the core packet codec, command parsing, and data serialization logic for PostgreSQL. It replaces the previous monolithic or mixed implementation with a dedicated codec engine that handles startup negotiation, extended protocol message aggregation (Parse, Bind, Describe, Execute, Sync, Close, Flush), and specific packet types like DataRow, RowDescription, and error responses. The implementation includes support for binary and text value formats, bytea encoding, boolean handling, and array column type OID resolution, providing a cleaner separation of concerns for PostgreSQL-specific database protocol interactions.
database/protocol/dialect/postgresql · high confidence
Introduce new SPI infrastructure with typed and ordered loaders
The \infra/spi\ module now provides a new service-provider infrastructure featuring a base \ShardingSphereSPI\ interface, a \ShardingSphereServiceLoader\ for managing singleton and multiton instances, and specialized loaders for \TypedSPI\ (with type matching and property initialization) and \OrderedSPI\ (with load-ordering and caching). This change also adds supporting annotations like \@SingletonSPI\ and \@SPIDescription\, a \ServiceProviderNotFoundException\, and a \PluginTypeAndClassMapper\ to facilitate plugin-based SPI registration.
infra/spi · high confidence
Introduce new SQL execution engine and audit infrastructure
The executor module now includes a new SQL execution engine (ExecutorEngine) that manages thread pools for serial and parallel SQL execution, alongside a new SQL audit engine (SQLAuditEngine) and SQLAuditor SPI for rule-based SQL auditing. This change also introduces SQL execution checkers (SQLExecutionChecker) and refactors execution context models (ExecutionContext, ExecutionUnit, SQLUnit) to support the new execution flow.
infra/executor · high confidence
Introduce new SQL routing infrastructure in infra/route/core
This change introduces the core routing components for the new infrastructure layer, including the SQLRouteEngine that orchestrates routing via SPI-based SQLRouter implementations, and a new tableless routing engine to handle statements without table references (such as DDL, TCL, and specific DAL statements). It also adds the RouteContext, RouteUnit, and RouteMapper classes to manage routing results, along with specific engines for broadcast and unicast tableless routes.
infra/route/core · high confidence
Introduce new SupportedSQLCheckEngine for validating SQL statements
The \infra/checker\ module now includes a new \SupportedSQLCheckEngine\ that orchestrates SQL validation by iterating through registered \SupportedSQLCheckers\ (built via \SupportedSQLCheckersBuilder\) to determine which rules apply to a given \SQLStatementContext\. This engine resolves the current schema from the database metadata and delegates the actual check logic to specific checker implementations, allowing for more modular and extensible SQL support validation within the infrastructure layer.
infra/checker · high confidence
Introduce new data source pool infrastructure with catalog switching and graceful destruction
The \infra/data-source-pool/core\ module now provides a new foundation for managing data source pools, featuring a \CatalogSwitchableDataSource\ that automatically sets the database catalog on new connections and safely closes them if the switch fails. Pool creation is handled by \DataSourcePoolCreator\, which uses reflection to configure data sources and supports \java.time.Duration\ for timeout properties. Additionally, \DataSourcePoolDestroyer\ ensures graceful shutdown by waiting for active connections to complete before closing the pool, and property configuration now supports underscore-separated keys which are converted to camelCase.
infra/data-source-pool/core · high confidence
Introduce new pipeline data source configuration API and SPIs
The data-pipeline-api module now exposes a new \PipelineDataSourceConfiguration\ interface along with \ShardingSpherePipelineDataSourceConfiguration\ and \StandardPipelineDataSourceConfiguration\ implementations, enabling pipelines to manage data source settings via a unified API. It also adds \JdbcQueryPropertiesExtension\ and \PipelineDataSourceCreator\ SPIs to allow database-specific query property extensions and custom data source creation, while tests verify that runtime configurations are correctly derived from YAML parameters and that custom pool properties are properly applied.
kernel/data-pipeline/api · high confidence
Introduce pluggable Calcite provider for SQL Federation
The SQL Federation feature now supports a pluggable provider architecture, with this change adding the Calcite-based implementation. Users can now leverage Apache Calcite to optimize and execute federated SQL queries, with the provider registered via SPI. The default federation provider remains NONE, meaning federation is disabled by default until explicitly configured to use the new Calcite provider.
kernel/sql-federation/provider/calcite · high confidence
Introduce programmatic metric configuration model
The metrics core module now supports defining metric configurations via Java code rather than relying solely on YAML. New classes, MetricCollectorType and MetricConfiguration, provide a structured way to specify metric IDs, types (Counter, Gauge, Histogram, Summary, GaugeMetricFamily), help text, labels, and properties, enabling more flexible and type-safe metric registration within the agent.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/config · high confidence
Introduce sharding-specific MCP resource handlers and planning tools
This change adds the concrete implementation for the Sharding feature within the MCP (Model Context Protocol) layer. It introduces \ShardingMCPHandlerProvider\ to register a comprehensive set of resource handlers (covering algorithms, strategies, key generators, table rules, and governance data like auditors and rule counts) and tool handlers for planning operations (such as planning table rules, default strategies, and component cleanup). Additionally, it provides \ShardingAlgorithmCompletionHandler\ to support auto-completion for sharding algorithm types, enabling users to interact with sharding configurations through standardized MCP resources and tools.
mcp/features/sharding/src/main/java/org/apache/shardingsphere/mcp/feature/sharding · high confidence
Introduce standalone consistency check job scenario
Adds a new \CONSISTENCY\_CHECK\ pipeline job type that allows users to run data consistency checks independently of the main migration pipeline. This includes the job entry point, API for starting/stopping/dropping checks, configuration models, and the task runner that executes the actual comparison logic against the source and target databases.
kernel/data-pipeline/scenario/consistency-check · high confidence
Introduce standalone mode context manager and persist service facade
This change adds the core implementation for the standalone mode, including the StandaloneContextManagerBuilder which initializes the context with a standalone repository and exclusive operator, and the StandalonePersistServiceFacade which exposes metadata, compute node, and process persistence services. It also includes the StandaloneMetaDataManagerPersistService for handling database, schema, table, and rule metadata operations, along with supporting components like the worker ID generator and YAML configuration swapper, enabling the system to manage metadata and state in a single-node environment.
mode/type/standalone/core · high confidence
Introduce standalone repository API interfaces and configuration
The standalone mode repository module now exposes a dedicated API layer, adding the \StandalonePersistRepository\ interface (extending \PersistRepository\) and the \StandalonePersistRepositoryConfiguration\ class to manage repository type and properties. This change establishes the contract and configuration structure for standalone persistence, separating the API definition from implementation details.
mode/type/standalone/repository/api · high confidence
Introduce transaction API, configuration validation, and SPI interfaces
This change adds the core API definitions for transaction management in the \kernel/transaction/api\ module. It introduces the \TransactionType\ enum (LOCAL, XA, BASE) and a \TransactionRuleConfiguration\ class that enforces configuration constraints via Bean Validation, ensuring the \defaultType\ is valid and that XA transactions have a registered provider. It also defines the \ShardingSphereDistributedTransactionManager\ SPI for distributed transaction implementations and the \TransactionHook\ SPI for lifecycle callbacks, along with corresponding unit tests for the configuration validation and transaction type logic.
kernel/transaction/api · high confidence
Introduces AgentServiceLoader for SPI-based service discovery
The agent core now provides an \AgentServiceLoader\ utility that wraps Java's standard \ServiceLoader\ to discover and cache implementations of agent SPI interfaces. This change enables the agent to dynamically load and manage multiple service implementations at runtime, ensuring that discovered services are cached per interface type for efficient access.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/spi · high confidence
Introduces OpenTelemetry tracing constants
A new constants class for the OpenTelemetry tracing plugin has been added, defining the tracer name as 'shardingsphere-agent'. This establishes the identifier used for trace generation within the agent's OpenTelemetry integration.
agent/plugins/tracing/type/opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/constant · high confidence
Introduces prepared statement caching and connection resource locking in the proxy backend
The proxy backend now includes a prepared statement caching mechanism to reuse server-side prepared statements within a session, reducing the overhead of repeated statement creation. This is implemented via new classes in the \proxy/backend/core\ module: \PreparedStatementCacheContext\ manages the LRU cache of statements, \ServerPreparedStatementRegistry\ tracks active statements by ID, and \JDBCBackendStatement\ handles the logic for retrieving or creating cached statements. Additionally, a \ConnectionResourceLock\ has been added to manage concurrency and prevent resource conflicts when handling network channel writes, ensuring smoother connection handling under load.
shardingsphere-proxy-backend-core · high confidence
Introduces sharding-specific metadata revisers and aggregation logic
This change adds new classes in the sharding core module to handle the revision and aggregation of database metadata for sharded tables. Specifically, it introduces \ShardingIndexReviser\, \ShardingConstraintReviser\, \ShardingColumnGeneratedReviser\, and \ShardingSchemaTableAggregationReviser\ to correctly map actual database indexes, constraints, and columns to their logical sharding counterparts. It also adds \ShardingDataNodeRuleAttribute\ to manage the mapping between logic and actual data nodes, and \BindingTableRule\ to support deducing actual table names across binding tables. These components ensure that metadata operations (like DDL) and routing logic correctly account for sharding configurations.
shardingsphere-sharding-core · high confidence
Introduction of MethodTimeRecorder for agent method timing
The agent plugin core now includes a new MethodTimeRecorder class that tracks the execution time of specific agent advice methods. This component uses a ThreadLocal map to store start times keyed by the advice class and method name, allowing users to measure and retrieve the elapsed time for individual method executions within the agent's advice chain.
shardingsphere-agent-plugin-core · high confidence
Introduction of MetricsExporter interface
A new MetricsExporter interface has been added to the metrics core module, defining a contract for exporting gauge metric family collectors based on a specified plugin type.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter · high confidence
Introduction of PluginJarLoader to filter hidden JARs
The agent core now includes a new PluginJarLoader component that scans the plugins directory for JAR files. This loader explicitly filters out hidden files during the scan, ensuring that only visible plugin JARs are loaded and processed by the agent.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/jar · high confidence
Introduction of SQL parse tree caching mechanism
The SQL parsing engine now includes a caching layer for parsed Abstract Syntax Trees (ASTs) to optimize repeated parsing operations. This change introduces a \ParseTreeCacheLoader\ that utilizes Caffeine cache to store and retrieve \ParseASTNode\ objects, reducing the overhead of re-parsing identical SQL statements by delegating to the \SQLParserExecutor\ only when cache misses occur.
shardingsphere-parser-sql-engine-core · high confidence
Introduction of YAML plugin configuration loader
A new YamlPluginConfigurationLoader class has been added to the agent core to handle the loading of plugin configurations from YAML files. This component provides a static method to read a YAML file, unmarshal its contents into a YamlAgentConfiguration object using the existing AgentYamlEngine, and return the result as an Optional, enabling the agent to dynamically load and apply plugin settings.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/config/yaml/loader · high confidence
Introduction of centralized Resource ID generator
A new \ResourceIdGenerator\ utility class has been added to the transaction core module. This singleton component provides a thread-safe mechanism for generating unique resource identifiers using an atomic counter, ensuring consistent ID generation across the transaction system.
shardingsphere-transaction-core · high confidence
Load balancer SPI module structure and registration
The load balancer SPI module now includes the core \LoadBalanceAlgorithm\ interface and a \LoadBalanceAlgorithmTypeAndClassMapper\ implementation, with the mapper registered via the \META-INF/services\ SPI file to enable discovery under the \LOAD\_BALANCE\_ALGORITHM\ type. This change also adds unit tests to verify that the SPI loader correctly resolves the mapper and its associated plugin class.
infra/algorithm/type/load-balancer/spi · high confidence
MySQL SQL Federation dialect support added
This change introduces the MySQL-specific implementation for SQL Federation, enabling the system to route and execute MySQL queries through the federation engine. It registers MySQL-specific SQL functions (including \bin\, \atan\, and \atan2\), explicitly marks a list of unsupported MySQL functions (such as \DATABASE\, \HEX\, and \AES\_ENCRYPT\), and configures the connection to use MySQL 5 conformance and lexing rules. Additionally, it provides a column type converter that maps MySQL boolean values to integers and ensures boolean/any types are treated as VARCHAR in the federation context.
kernel/sql-federation/dialect/mysql, kernel/sql-federation/dialect/postgresql · high confidence
MySQL dialect binder implementation added
The MySQL-specific binder module now includes a dedicated SQL bind engine and statement context provider, wiring in binders for MySQL-specific statements such as LOAD DATA, LOAD XML, OPTIMIZE TABLE, SHOW COLUMNS, SHOW CREATE TABLE, and SHOW INDEX. A MySQL projection identifier extractor is also provided to handle column naming for projections, including truncation of subquery-derived names to 255 characters, and the dialect is registered via service provider files so the framework can discover and use these MySQL-specific behaviors.
infra/binder/dialect/mysql · high confidence
MySQL dialect connector implementation and service registrations
The MySQL dialect connector now provides a complete set of implementation classes for database interaction and metadata handling. This includes a privilege checker that validates specific MySQL permissions (such as REPLICATION SLAVE and XA\_RECOVER\_ADMIN) using SHOW GRANTS, a metadata loader that queries information\_schema for table, column, index, and constraint details, and a case policy provider that dynamically adjusts identifier sensitivity based on the MySQL lower\_case\_table\_names system variable. Additionally, the connector registers default JDBC query properties (e.g., rewriteBatchedStatements, useSSL), parses connection URLs, defines MySQL-specific data type mappings (including JSON and geometry types), and lists supported system databases and tables, all wired via Java SPI service files.
database/connector/dialect/mysql/src/main · high confidence
MySQL dialect exception mapping and error definitions
This change introduces the MySQL-specific exception handling layer within the database exception module. It adds a comprehensive set of MySQL dialect exception classes (such as CollationCharsetMismatchException, DatabaseAccessDeniedException, and UnknownCharsetException) and a MySQLDialectExceptionMapper that translates internal SQL dialect exceptions into standard Java SQLExceptions with correct MySQL vendor error codes and SQL states. The MySQLVendorError enum defines the specific error constants used by the mapper, and the mapper is registered via the Java SPI mechanism so it is automatically discovered for MySQL database types.
database/exception/dialect/mysql · high confidence
MySQL dialect frontend engine and authentication implementation
The MySQL dialect module now includes a complete frontend engine implementation, introducing the MySQLFrontendEngine as the entry point for handling MySQL protocol connections. This update adds a new MySQLAuthenticationEngine that supports multiple authentication methods, including native password, clear text, and caching SHA-2 password authentication, along with their respective authenticator implementations. The module also provides a comprehensive command execution framework with a MySQLCommandExecuteEngine and factory classes to handle various MySQL commands such as COM\_QUERY, COM\_STMT\_PREPARE, COM\_STMT\_EXECUTE, and others. Additionally, it introduces a MySQLServerPreparedStatement class to manage binary prepared statements with support for long data parameters.
proxy/frontend/dialect/mysql · high confidence
New CDC server and unified frontend channel handling in proxy core
The proxy frontend core module now includes a dedicated CDC server (CDCServer, CDCChannelInboundHandler) that accepts gRPC-based CDC connections with login and privilege checks, alongside a refactored main proxy entry point (ShardingSphereProxy) that supports both TCP and Unix domain socket listeners. Frontend connection handling is unified through new channel inbound handlers (FrontendChannelInboundHandler, ChannelAttrInitializer) that manage authentication, idle connection closure, and command execution via a centralized CommandExecutorTask, replacing previous scattered Netty pipeline configurations.
proxy/frontend/core · high confidence
New DistSQL handlers for SQL Federation rule management and preview
This change introduces new DistSQL handler components in the \kernel/sql-federation/distsql/handler\ module to manage SQL Federation configuration and execution previews. Users can now use the \SHOW SQL\_FEDERATION RULE\ command to view current federation settings (enabled status, provider type, cache options) and the \ALTER SQL\_FEDERATION RULE\ command to modify these settings, including the provider type (e.g., CALCITE, NONE), cache parameters, and query usage flags. Additionally, a new \SQLFederationPreviewExecutionUnitGenerator\ enables the PREVIEW execution mode for SQL federation, allowing users to inspect execution units before actual execution, with validation requiring a process ID for this mode.
kernel/sql-federation/distsql/handler · high confidence
New DistSQL handlers for migration job lifecycle and status queries
This change introduces a complete set of DistSQL query and update executors for the migration scenario, enabling users to manage and monitor data migration jobs via SQL. The new handlers support listing migration jobs, viewing detailed job and consistency-check statuses, and inspecting migration rules and source storage units. Operationally, users can now start, stop, commit, and rollback migration jobs, as well as start, stop, check, and drop consistency checks. Source storage units can be registered and unregistered, and table migration can be scheduled, all handled through dedicated executors in the \query\ and \update\ packages.
kernel/data-pipeline/scenario/migration/distsql/handler · high confidence
New DistSQL handlers for parsing and configuring the SQL Parser rule
This change introduces three new DistSQL executor implementations in the parser module: ParseDistSQLExecutor, which allows users to inspect the parsed structure of a SQL statement; ShowSQLParserRuleExecutor, which displays the current cache configuration (parse tree and SQL statement cache settings) for the SQL Parser rule; and AlterSQLParserRuleExecutor, which enables users to modify those cache settings (initial capacity and maximum size) via the ALTER SQL\_PARSER RULE command. The executors are registered via SPI files and include corresponding test cases to verify the query and update behaviors.
kernel/sql-parser/distsql/handler · high confidence
New DistSQL parser engine with modular grammar and plugin-based parsing
The DistSQL parser has been restructured into a new engine that separates kernel management commands (such as storage unit registration, compute node control, and metadata refresh) from utility commands (like SQL preview and parse). The parser now uses modular ANTLR grammar files (RAL, RDL, RQL, RUL) and supports a plugin-based architecture via the DistSQLParserFacade SPI, allowing different parser implementations to be loaded and tried sequentially. This enables extensibility for custom DistSQL commands while maintaining a unified entry point for parsing.
parser/distsql/engine · high confidence
New DistSQL statement and segment model for RAL commands
The parser/distsql/statement module now introduces a structured AST model for DistSQL commands, replacing the previous flat structure. This includes a new \DistSQLSegment\ interface for parsing fragments (such as \DataSourceSegment\ for connection details and \AlgorithmSegment\ for configuration) and a hierarchy of statement classes (\RALStatement\, \QueryableRALStatement\, \UpdatableRALStatement\) to represent specific operations like \ShowComputeNodes\, \ExportDatabaseConfiguration\, and \LockCluster\. This change enables more precise parsing and handling of DistSQL commands by separating segment-level data from statement-level logic.
parser/distsql/statement · high confidence
New DistSQL statement models for migration pipeline operations
This change introduces a new set of DistSQL statement classes in the migration scenario module to support data migration workflows. It adds the \MigrationSourceTargetSegment\ to define source-to-target table mappings and implements statement models for querying migration status (\ShowMigrationListStatement\, \ShowMigrationStatusStatement\, \ShowMigrationCheckStatusStatement\, \ShowMigrationRuleStatement\, \ShowMigrationSourceStorageUnitsStatement\) and executing updatable migration commands (\MigrateTableStatement\, \CheckMigrationStatement\, \CommitMigrationStatement\, \StartMigrationCheckStatement\, \StartMigrationStatement\, \StopMigrationCheckStatement\, \StopMigrationStatement\, \RollbackMigrationStatement\, \RegisterMigrationSourceStorageUnitStatement\, \UnregisterMigrationSourceStorageUnitStatement\, \DropMigrationCheckStatement\). These classes provide the structured data models required for the DistSQL parser and executor to handle migration-related commands.
kernel/data-pipeline/scenario/migration/distsql/statement · high confidence
New DistSQL statements for SQL parser rule configuration
This change introduces new DistSQL statement classes in the \kernel/sql-parser/distsql/statement\ module to manage SQL parser rules. Specifically, it adds \AlterSQLParserRuleStatement\ for updating parser settings (including cache options like initial capacity and maximum size) and \ShowSQLParserRuleStatement\ for querying current parser rule configurations. These statements extend the existing global rule definition and query hierarchies (\GlobalRuleDefinitionStatement\ and \ShowGlobalRulesStatement\), enabling users to configure and inspect SQL parser behavior via DistSQL commands.
kernel/sql-parser/distsql/statement · high confidence
New Dockerfiles for Agent, Proxy, and MCP distributions with JDK 25 base
The distribution module now includes new Dockerfiles for the ShardingSphere Agent, Proxy, and MCP components. The Agent and Proxy Dockerfiles have been updated to use the eclipse-temurin:25-jdk base image, replacing previous JDK versions. A new Dockerfile for the MCP server is introduced, based on eclipse-temurin:21-jre, exposing port 18088 and providing a standalone metadata and SQL access server. Additionally, new Dockerfiles for Proxy Native (linux-dynamic, linux-mostly, linux-static) are added, utilizing GraalVM Community 25.0.2 for building native images and distroless or scratch images for the final runtime.
distribution · high confidence
New Espresso inline expression parser for table routing
The \infra/expr/type/espresso\ module introduces the \EspressoInlineExpressionParser\, enabling users to define inline expressions (e.g., \t\order\${0..2}\) for table routing. This parser leverages GraalVM's Espresso technology to evaluate Groovy-like syntax, supporting features such as ranges, arrays, and nested calculations. It is registered via the \InlineExpressionParser\ SPI under the type \ESPRESSO\ and is designed to run on GraalVM Community Edition.
infra/expr/type/espresso · high confidence
New Groovy expression utilities and SPI interface in core module
The infra/expr/core module now includes the GroovyUtils utility class for splitting GroovyShell expressions, the InlineExpressionParser SPI interface for parsing and evaluating inline expressions, and the InlineExpressionEvaluationException class. These additions support the existing Espresso and Groovy inline expression parsers and sharding algorithms by providing core infrastructure for expression handling.
infra/expr/core · high confidence
New JDBC metrics for statement execution and transactions
The agent now collects metrics for ShardingSphere-JDBC, including counters for statement execution and errors (labeled by statement type), a histogram for statement execution latency, and counters for transaction commits and rollbacks. These new advice classes enable visibility into JDBC performance and error rates.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/jdbc · high confidence
New MCP descriptors and prompts for broadcast, shadow, and sharding features
This change introduces the MCP (Model Context Protocol) resource descriptors and prompt templates for the broadcast, shadow, and sharding features. It registers the corresponding \MCPHandlerProvider\ implementations and defines the \shardingsphere://features/{feature}/...\ resource URIs, tools, and prompts that allow an AI model to inspect and plan DistSQL operations for broadcast tables, shadow rules/algorithms, and sharding tables/strategies/key generators. These files provide the structured metadata and guidance workflows that enable the MCP layer to interact with these specific ShardingSphere capabilities.
mcp/features/sharding · high confidence
New MessageDigestAlgorithm SPI interface introduced
A new SPI interface, MessageDigestAlgorithm, has been added to the message-digest module. It extends ShardingSphereAlgorithm and defines a digest method that accepts an Object as input and returns a byte array, establishing the contract for message digest implementations within the infrastructure.
infra/algorithm/type/message-digest/spi · high confidence
New MessageDigestAlgorithmEngine for configurable digest encoding
A new MessageDigestAlgorithmEngine has been introduced in the message-digest core module to handle the encoding of digest results. This engine allows users to specify whether the output should be returned as a raw byte array or encoded as a Base64 or Hex string, and includes logic to calculate the expected encoded length for these formats.
infra/algorithm/type/message-digest/core · high confidence
New MySQL command executors and statement ID generator
The MySQL frontend dialect module now includes dedicated executors for several MySQL protocol commands, including COM\_RESET\_CONNECTION, COM\_SET\_OPTION, COM\_INIT\_DB, COM\_PING, COM\_STMT\_SEND\_LONG\_DATA, COM\_STMT\_CLOSE, and COM\_STMT\_RESET, along with a new MySQLStatementIdGenerator for managing prepared statement IDs. These changes enhance the proxy's ability to handle specific MySQL client interactions and prepared statement lifecycle management.
shardingsphere-proxy-frontend-mysql · high confidence
New NodePathVariable utility for parsing path variables
Added a new NodePathVariable class in the mode node path engine generator package to support parsing and extracting variable names from node paths. This utility enables the system to identify and process path segments containing variable placeholders (formatted as ${variableName}), allowing for more flexible and dynamic node path resolution within the mode management system.
shardingsphere-mode-node · high confidence
New Python scripts for coding-standards, gen-ut, and review-pr skills
Added three new Python scripts to the .codex skills infrastructure: build\_audit\_inventory.py for the coding-standards skill to generate a deterministic, read-only scope inventory of repository modules and files; scan\_quality\_rules.py for the gen-ut skill to perform mechanical quality-rule scanning and enforce task-scope guards; and resolve\_review\_scope.py for the review-pr skill to provide shared helpers for resolving and categorizing changed files against a baseline. These scripts introduce new automated checks and scope-resolution capabilities within their respective skill workflows.
python · high confidence
New SPI interfaces for repository persistence and rule configuration changes
The mode SPI module introduces three new interfaces to standardize internal extension points: \PersistRepository\ provides a typed SPI for basic key-value data operations (query, persist, update, delete); \RuleChangedItemType\ serves as a data carrier for rule change events; and \RuleItemConfigurationChangedProcessor\ defines a singleton SPI for handling rule item configuration lifecycle events such as swapping, finding, changing, and dropping configurations.
mode/spi · high confidence
New SQL parser core extractor package and supporting enums
The \parser/sql/statement/core\ module now includes a new \parser.statement.core.extractor\ package containing \ColumnExtractor\, \ExpressionExtractor\, and \SubqueryExtractor\ classes to handle column, expression, and subquery extraction from SQL ASTs. This change also introduces a comprehensive set of new enums in the \enums\ subpackage (such as \AggregationType\, \JoinType\, \LogicalOperator\, \DirectionType\, \Paren\, and \SubqueryType\) to provide structured type definitions for SQL parsing components.
parser/sql/statement/core · high confidence
New SQL parser engine core with caching and comment handling
The parser/sql/engine/core module introduces a new SQL parsing engine that includes configurable parse-tree caching via Caffeine (exposed through CacheOption with initialCapacity and maximumSize), a two-phase parsing strategy (SLL followed by LL fallback) in SQLParserExecutor, and improved handling of MySQL-specific executable comments (/\!...\/) by merging hidden tokens in ParseASTNode. It also provides a visitor engine (SQLStatementVisitorEngine) that applies database-specific visitor rules and appends SQL comments to parsed statements, along with dedicated exception types (SQLParsingException, SQLASTVisitorException) for clearer error reporting.
parser/sql/engine/core · high confidence
New SQL92 SQL parser dialect
Added a new SQL92 parser dialect to the engine, including ANTLR grammar definitions, lexer/parser classes, and statement visitors for DDL, DML, DCL, and TCL statements.
parser/sql/engine/dialect/sql92 · high confidence
New URL configuration parsing and placeholder replacement infrastructure
The \infra/url/core\ module introduces a new URL parsing model via \ShardingSphereURL\, which extracts a source type (e.g., \absolutepath:\, \classpath:\, \zookeeper:\, \etcd:\), a configuration subject, and query properties from configuration URLs. It also adds a placeholder replacement system (\URLArgumentLine\, \URLArgumentLineRender\) that supports resolving arguments from environment variables or system properties using the \$$${name::default}\ syntax, with the resolution type controlled by a \placeholder-type\ query parameter. Additionally, the \infra/url/spi\ module defines new SPIs (\ShardingSphereLocalFileURLLoader\, \ShardingSphereModeConfigurationURLLoader\) to load configuration content and mode configurations respectively.
infra/url/core · high confidence
New WEIGHT load balancer algorithm for proportional traffic distribution
The WEIGHT load balancing algorithm is now available, allowing users to assign specific weights to database or table targets to distribute traffic proportionally. This implementation validates that all configured targets have defined weights and handles dynamic target changes by recalculating probability distributions, ensuring that the sum of weights equals 1. It also robustly handles edge cases such as infinite or NaN weight values and stale cache states when the set of available targets changes size.
infra/algorithm/type/load-balancer/type/weight · high confidence
New XA transaction manager and database-specific connection wrappers
This change introduces the core XA transaction management implementation for ShardingSphere. It adds \XAShardingSphereTransactionManager\ to handle distributed transaction lifecycle (begin, commit, rollback) and \XATransactionDataSource\ to manage resource enlistment. It also provides dialect-specific \XAConnectionWrapper\ implementations for PostgreSQL, Oracle, OpenGauss, MySQL, MariaDB, H2, and Firebird, enabling proper XA connection wrapping for these databases. The \DataSourceSwapper\ component allows swapping standard data sources with XA-capable ones by reflecting database access properties.
kernel/transaction/type/xa/core · high confidence
New YAML configuration entities for advisor pointcuts
Added four new Java classes (YamlAdvisorConfiguration, YamlAdvisorsConfiguration, YamlPointcutConfiguration, YamlPointcutParameterConfiguration) in the agent core advisor config package to support structured YAML-based configuration of advisors and pointcuts, including fields for target, advice, pointcut name, type, modifiers, return type, parameter length, and parameter details.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/advisor/config/yaml/entity · high confidence
New YAML configuration entities for agent plugins
Added three new Java classes to the agent's YAML configuration model: YamlAgentConfiguration, YamlPluginCategoryConfiguration, and YamlPluginConfiguration. These entities define the structure for loading agent plugin settings, supporting distinct configuration maps for logging, metrics, and tracing categories, while individual plugin configurations specify connection details (host, port, password) and generic properties.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/config/yaml/entity · high confidence
New YAML plugins configuration swapper for agent
Added YamlPluginsConfigurationSwapper to convert YAML agent configuration into plugin configurations, supporting logging, metrics, and tracing plugins.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/config/yaml/swapper · high confidence
New YAML-based advisor configuration swappers
The agent now supports configuring advisors via YAML files. New swapper classes in the agent core parse YAML definitions for pointcuts (including method names, constructors, modifiers, parameters, and return types) and convert them into runtime advisor configurations, allowing users to define interception rules through configuration files rather than code.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/advisor/config/yaml/swapper · high confidence
New ZooKeeper-based cluster persistence provider
This location introduces the ZooKeeper implementation for the cluster mode's persist repository, allowing users to configure ZooKeeper as the backend for cluster state and metadata. It provides the \ZookeeperRepository\ for core persistence operations (create, read, update, delete, watch) and the \ZookeeperCoordinatorRegistryCenterProvider\ to initialize the ElasticJob registry center. The implementation includes a \SessionConnectionReconnectListener\ to automatically re-register the node as online after connection loss, and a \ZookeeperExceptionHandler\ to manage ZooKeeper-specific errors like connection loss or node existence conflicts.
mode/type/cluster/repository/provider/zookeeper · high confidence
New agent API interfaces for plugin advice and configuration
The agent API now exposes a set of new interfaces and classes to support plugin-based instrumentation. Plugin developers can configure agent settings via the new \PluginConfiguration\ class. The core advice model is defined by the \AgentAdvice\ base interface, with specific implementations for intercepting constructors (\ConstructorAdvice\), instance methods (\InstanceMethodAdvice\), and static methods (\StaticMethodAdvice\). These advice interfaces provide hooks for \beforeMethod\, \afterMethod\, \onThrowing\, and \onConstructor\ events, passing context via \TargetAdviceObject\ and \TargetAdviceMethod\ wrappers, and identifying the plugin via a \pluginType\ string parameter.
agent/api/src/main/java/org/apache/shardingsphere/agent/api/advice · high confidence
New agent builder interceptor chain engine
The agent core now includes a new interceptor mechanism for the ByteBuddy-based agent builder. A new \AgentBuilderInterceptor\ interface allows custom logic to modify the agent builder, and the \AgentBuilderInterceptChainEngine\ utility applies a chain of these interceptors sequentially, enabling extensible modification of the agent's build process.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/builder/interceptor · high confidence
New agent builder interceptors for method advising and target advice injection
The agent core now includes two new builder interceptors: MethodAdvisorBuilderInterceptor, which applies advice executors to methods matching a configured pointcut, and TargetAdviceObjectBuilderInterceptor, which injects a volatile field to support the TargetAdviceObject interface. These changes enhance the agent's ability to intercept and modify target classes during bytecode instrumentation.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/builder/interceptor/impl · high confidence
New algorithm core infrastructure with unified exception hierarchy
The infra/algorithm/core module now provides the foundational SPI interface (ShardingSphereAlgorithm), a standardized configuration model (AlgorithmConfiguration), and a dedicated exception hierarchy (AlgorithmSQLException and subclasses like AlgorithmDefinitionException, AlgorithmExecuteException, and AlgorithmInitializationException) to improve error reporting for algorithm operations. It also introduces an AlgorithmChangedProcessor to handle rule-level algorithm configuration changes and utility classes for value conversion, establishing the core structure for algorithm management.
infra/algorithm/core · high confidence
New connection management and thread execution infrastructure
The proxy frontend core now introduces dedicated classes to manage connection limits and per-connection thread execution. ConnectionLimitContext enforces the configured maximum number of frontend connections (PROXY\_FRONTEND\_MAX\_CONNECTIONS) by tracking active connection counts, while ConnectionThreadExecutorGroup assigns a dedicated single-thread executor to each connection session to ensure consistent thread identity for processing, such as XA transactions.
shardingsphere-proxy-frontend-core · high confidence
New cryptographic algorithm SPI and core utilities
This change introduces the foundational SPI interfaces and core utility classes for the cryptographic algorithm module. It adds the \CryptographicAlgorithm\ interface defining encrypt/decrypt contracts, the \CryptographicContext\ for passing charset and binary flags, and the \CryptographicPropertiesProvider\ interface for exposing secret keys, modes, padding, IVs, and encoders. Additionally, it provides \CryptographicAlgorithmValueUtils\ to handle value conversion and Base64 decoding with legacy whitespace tolerance, accompanied by comprehensive unit tests for these utilities.
infra/algorithm/type/cryptographic/spi · high confidence
New database connector core exception classes and data type registry
The database connector core module now includes a new set of exception classes under the \org.apache.shardingsphere.database.connector.core.exception\ package, such as \CheckDatabaseEnvironmentFailedException\, \ConnectionURLException\, and \MissingRequiredPrivilegeException\, to provide more specific error reporting for database connection and metadata issues. Additionally, a new data type registry (\DataTypeRegistry\) and loader (\DataTypeLoader\) have been added under \org.apache.shardingsphere.database.connector.core.metadata.database.datatype\ to load and cache database-specific data type mappings from the JDBC metadata, enabling more accurate type handling during database operations.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/exception, database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/datatype · high confidence
New database-specific SQL parser examples
The parser example module now includes dedicated entry-point classes for MySQL, openGauss, Oracle, PostgreSQL, SQL92, and SQL Server. Each example demonstrates how to use the SQLParserEngine and SQLStatementVisitorEngine to parse and visit SQL statements (DML and DDL) for its respective database dialect, allowing users to quickly verify parsing behavior for specific engines.
examples/shardingsphere-parser-example · high confidence
New metrics collector type interfaces added
The metrics core module now exposes specific interfaces for different metric types: CounterMetricsCollector, GaugeMetricsCollector, GaugeMetricFamilyMetricsCollector, HistogramMetricsCollector, and SummaryMetricsCollector. These interfaces define the contract for incrementing/decrementing counters, adding gauge values, and observing histogram/summary data points, providing a structured way to collect and export metrics within the agent.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/collector/type · high confidence
New openGauss SQL parser implementation
The openGauss SQL parser has been implemented from scratch, introducing a complete set of ANTLR grammar files (covering DDL, DML, DCL, TCL, and DAL statements) and the corresponding Java lexer and parser classes. This new parser enables the system to correctly parse and analyze openGauss-specific SQL syntax, including transaction control, data definition, and data manipulation commands.
parser/sql/engine/dialect/opengauss · high confidence
New parser SPI interfaces for dialect-specific parsing and statement visitors
The parser SPI module now exposes new interfaces that allow database-specific implementations to provide their own SQL lexer and parser classes via \DialectSQLParserFacade\, and to supply distinct visitor implementations for each SQL statement category (DML, DDL, TCL, LCL, DCL, DAL) through \SQLStatementVisitorFacade\. This change introduces the foundational SPI contracts in this module, enabling the rest of the system to resolve dialect-specific parsing and visitor logic at runtime.
parser/sql/spi · high confidence
New parser core abstractions for SQL statement attributes and property segments
The core parser module introduces new infrastructure classes to enhance SQL statement representation: \PropertiesSegment\ for DDL property handling, \SQLStatementAttributes\ to manage statement-level metadata, and specific attributes like \AllowNotUseDatabaseSQLStatementAttribute\ (enabling MySQL DDL execution without a selected database) and \WithSQLStatementAttribute\ (tracking WITH clauses). Additionally, \CollectionValue\ provides a reusable AST node for combining collection values. These changes support more granular parsing and attribute-based behavior for SQL statements.
shardingsphere-parser-sql-statement-core · high confidence
New pipeline channel and data consistency check infrastructure
The core module introduces a new SPI-based pipeline channel system, including the \PipelineChannel\ interface, \MemoryPipelineChannel\ implementation, and dedicated creators for inventory and incremental tasks, enabling configurable data transfer between pipeline stages. Additionally, it adds a new data consistency check framework featuring the \PipelineDataConsistencyChecker\ interface, \DataConsistencyCheckUtils\ for record comparison, and progress tracking via \ConsistencyCheckJobItemProgressContext\, providing the foundation for verifying data integrity during migration jobs.
kernel/data-pipeline/core · high confidence
New proxy metrics for metadata and state
Added two new exporters that expose proxy-specific metrics: \proxy\_meta\_data\_info\ reports the count of logic databases and storage units, while \proxy\_state\ indicates the current proxy status (e.g., OK or circuit break).
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy · high confidence
New review-pr scripts for scope inventory and coverage ledgers
Added \build\_review\_inventory.py\ and \manage\_review\_ledger.py\ to the review-pr skill. The inventory script generates a deterministic, scoped view of changed files (including GitHub vs. local diffs, dirty worktree status, and categorization) in JSON or Markdown. The ledger script manages private, temporary JSON files that track review coverage, findings, and passes with strict schema validation and secure file permissions.
.codex/skills/review-pr/scripts · high confidence
New structured exception hierarchy and precondition utilities in infra.exception
The infra.exception module now provides a comprehensive, structured exception hierarchy and a set of static precondition utilities. Users can leverage ShardingSpherePreconditions for robust state, null, and collection checks, while the new exception classes (ShardingSphereExternalException, ShardingSphereSQLException, and their specialized subtypes like KernelSQLException, FeatureSQLException, and category-specific errors) offer detailed, standardized error reporting with SQL states and vendor codes. This change improves error clarity and debugging by providing a consistent, hierarchical approach to exception handling across the platform.
infra/exception · high confidence
New tracing advice classes for JDBC execution, root spans, and SQL parsing
The agent now includes core advice classes that automatically capture distributed tracing data for key database operations. \TracingJDBCExecutorCallbackAdvice\ records details for JDBC execution units, including connection properties and storage type. \TracingRootSpanAdvice\ manages the lifecycle of root spans, handling creation, completion, and exception recording. \TracingSQLParserEngineAdvice\ captures information when SQL is parsed. These changes enable users to see end-to-end traces for SQL execution, parsing, and root invocations within their ShardingSphere deployments.
agent/plugins/tracing/core/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/core/advice · high confidence
New utility classes for resource reading, JSON/YAML processing, and event handling
The infra/util module introduces several new utility classes to support configuration and runtime operations. A new JsonEngine provides JSON serialization and deserialization using Jackson, while YamlEngine handles YAML parsing and generation via SnakeYAML, including support for skipping missing properties. A DateTimeFormatterFactory adds formatters for datetime values with varying millisecond precision. Resource loading is enhanced with ClasspathResourceDirectoryReader for recursive directory reading (with fixes for JAR and GraalVM Native Image environments) and SystemResourceFileUtils for system resource access. Additionally, new classes include DataSourcesCloser and QuietlyCloser for safe resource cleanup, EventBusContext and EventSubscriber for event-driven communication, and utility classes for properties, reflection, regex, and hex string conversion.
infra/util · high confidence
OpenGauss SQL binder implementation added
The OpenGauss dialect now includes its own SQL binder components, specifically the \OpenGaussSQLBindEngine\, \OpenGaussProjectionIdentifierExtractor\, and \OpenGaussSQLStatementContextWarpProvider\. These classes delegate to their PostgreSQL equivalents to handle SQL binding, projection identifier extraction, and statement context wrapping for OpenGauss databases, ensuring consistent behavior with PostgreSQL while maintaining dialect-specific registration via SPI service files.
infra/binder/dialect/opengauss · high confidence
OpenTelemetry tracing implementation for JDBC, SQL parsing, and root spans
The OpenTelemetry tracing plugin now provides concrete advice implementations for JDBC execution, SQL parsing, and root span management. Users enabling OpenTelemetry tracing will see spans created for JDBC operations (recording database type, instance, hostname, port, SQL statement, and bind variables), SQL parsing steps, and root spans, with proper error handling and span termination.
agent/plugins/tracing/type/opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry/advice · high confidence
Oracle SQL Federation connection configuration support
Added Oracle-specific support for SQL Federation by introducing the OracleSQLFederationConnectionConfigBuilder, which configures the underlying Calcite engine with Oracle dialect settings (Oracle lex, ORACLE\_12 conformance, Oracle function libraries, and case-sensitivity). This implementation is registered via the Java SPI mechanism so that SQL Federation queries against Oracle databases now use the correct dialect configuration, and tests have been added to verify the built configuration.
kernel/sql-federation/dialect/oracle · high confidence
Oracle SQL parser grammar overhaul and expansion
The Oracle dialect parser has been significantly refactored and expanded by introducing a new modular ANTLR grammar structure (Alphabet, BaseRule, Comments, DALStatement, DCLStatement, DDLStatement, DMLStatement, Keyword). This change enables the parser to support a much broader range of Oracle-specific SQL syntax, including complex DDL operations (CREATE TABLE with encryption, compression, partitioning, and organization clauses; CREATE INDEX/TYPE/OPERATOR; ALTER TABLE EXCHANGE PARTITION), advanced DML features (multi-table inserts, RETURNING clauses, error logging), PL/SQL constructs (procedures, types, triggers), and various administrative commands (SET EXTPROC\_DLLS, RMAN CHANGE, SHOW options). Users can now parse and execute a wider variety of Oracle SQL statements that were previously unsupported or partially supported.
parser/sql/engine/dialect/oracle · high confidence
Oracle dialect connector implementation and metadata configuration
This change introduces the core Oracle dialect connector implementation, including the OracleConnectionPropertiesParser for handling JDBC URL parsing (including dotted service names and query properties), the OracleMetaDataLoader for retrieving table, column, and index metadata with improved case sensitivity detection for pre-12.2 and 18c+ versions, and the OracleDatabaseMetaData configuration defining Oracle-specific behaviors such as upper-case identifier patterns, ROWNUM-based pagination, and specific data type mappings. It also adds the OracleResultSetMapper to correctly handle Oracle-specific timestamp types (TIMESTAMP WITH TIME ZONE) and registers the OracleSystemDatabase to identify system schemas like SYS. These components are wired together via SPI service files to enable ShardingSphere to connect to, parse, and manage Oracle databases.
database/connector/dialect/oracle/src/main · high confidence
PostgreSQL dialect exception handling and mapping
This change introduces the PostgreSQL-specific exception infrastructure within the database module, adding a \PostgreSQLDialectExceptionMapper\ that translates internal ShardingSphere dialect exceptions (such as unknown database, table not found, authentication failures, and transaction errors) into standard PostgreSQL \SQLException\s with appropriate SQL states and severity levels. It also adds the \PostgreSQLException\ class with a \ServerErrorMessage\ structure, a \PostgreSQLVendorError\ enum defining error codes and messages, a \PostgreSQLState\ enum for SQL states, and specific authority/protocol exception classes, along with the SPI service registration to wire the mapper into the framework.
database/exception/dialect/postgresql · high confidence
PostgreSQL incremental data ingestion via logical replication
Users can now perform incremental data ingestion for PostgreSQL by capturing changes directly from the Write-Ahead Log (WAL) using logical replication. This change introduces the PostgreSQL-specific incremental dumper infrastructure, including the WAL event decoding logic (via the TestDecodingPlugin), position management based on log sequence numbers, and the conversion of WAL events into pipeline records. This enables real-time or near-real-time synchronization of PostgreSQL data changes into the pipeline.
kernel/data-pipeline/dialect/postgresql · high confidence
Prometheus metrics collector factory implementation
The Prometheus metrics collector factory has been implemented to instantiate specific Prometheus metric collectors (Counter, Gauge, Histogram, Summary, and GaugeMetricFamily) based on the configured metric type, enabling the agent to expose metrics in the Prometheus format.
agent/plugins/metrics/type/prometheus/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/prometheus/collector · high confidence
Prometheus metrics plugin now starts an HTTP server and registers exporters via lifecycle service
The Prometheus metrics plugin now includes a dedicated lifecycle service that initializes the Prometheus HTTP server and registers specific metric exporters. On startup, the service validates the configured port, binds an HTTP server to expose metrics, and registers exporters for build info, proxy state/metadata, and JDBC state/metadata. It also conditionally enables JVM default exports based on the 'jvm-information-collector-enabled' configuration property. This change centralizes the plugin's initialization and shutdown logic, ensuring the metrics endpoint is correctly managed alongside the agent's lifecycle.
agent/plugins/metrics/type/prometheus/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/prometheus · high confidence
Proxy statistics collection now runs in cluster mode
The statistics collection job is now active for Proxy instances running in cluster mode. Previously, this job was likely restricted or handled differently; now, a new lifecycle listener initializes a \StatisticsCollectJobWorker\ when the ContextManager starts in cluster mode, and shuts it down on destroy. The worker uses an SPI-based \CoordinatorRegistryCenterProvider\ to register with the coordination service and schedules the collection job using a configurable cron expression (\proxy.metadata.collector.cron\). A dedicated listener also allows the cron schedule to be updated dynamically at runtime. This change ensures that proxy-specific statistics are collected and refreshed in distributed deployments.
kernel/schedule/core · high confidence
SQL Server dialect connector implementation
The SQL Server dialect connector now provides a complete implementation for connecting to and managing SQL Server databases. This includes a JDBC URL parser for \jdbc:microsoft:sqlserver:\ and \jdbc:sqlserver:\ prefixes, a metadata loader that correctly handles table, column, index, and view information (including support for hidden columns in SQL Server 2015+), and database metadata definitions specifying SQL Server-specific behaviors such as bracket-quoted identifiers, \ROW\_NUMBER\-based pagination, and the \dbo\ default schema. The connector also registers system schemas (\information\_schema\, \sys\) and defines function options for unparenthesized functions like \CURRENT\_TIMESTAMP\.
database/connector/dialect/sqlserver/src/main · high confidence
Sharding data-pipeline feature adds column extraction and configuration revision
The new sharding data-pipeline feature module introduces two key components for handling sharding rules during data import. The PipelineShardingColumnsExtractor identifies required sharding columns for logic tables by analyzing standard and complex sharding strategies, ensuring the pipeline knows which columns to read. The ShardingPipelineRuleConfigurationReviser automatically adjusts sharding configurations for the pipeline environment by enabling range queries for inline sharding algorithms and removing audit strategies that are not supported during the import process.
kernel/data-pipeline/feature/sharding · high confidence
ShardingSphere-Proxy bootstrap entry point and configuration structure
The proxy bootstrap module introduces the main entry point (\Bootstrap.java\) which initializes the proxy by loading configuration from a configurable path (defaulting to \/conf/\), setting up the context manager, and starting the proxy server on the specified port. It also adds support for Unix domain sockets via command-line arguments, initializes SSL/TLS context, and optionally starts a CDC server. The module includes a new \BootstrapArguments\ class to parse startup arguments (port, config path, bind addresses, socket path), a \BootstrapInitializer\ to set up the backend executor and context, and a \ShardingSphereProxyVersion\ class that detects and sets the backend database version. Example configuration files (\global.yaml\, \database-\*.yaml\) are provided to demonstrate governance, authority, transaction, and rule configurations.
proxy/bootstrap · high confidence
Support for interval-based inline expression parsing
Added an \IntervalInlineExpressionParser\ that enables users to define inline expressions generating sequences of values over time intervals. The parser supports splitting and evaluating expressions based on various temporal units (Days, Months, Years, Millis) and granularities (LocalDate, LocalTime, LocalDateTime, YearMonth, Year, Month), including support for specific chronologies like Japanese dates. This allows for more flexible data sharding or routing strategies that depend on time-based ranges.
infra/expr/type/interval · high confidence
YAML configuration support for SQL Parser rule
Users can now configure the SQL Parser rule via YAML files. This change introduces the YamlSQLParserRuleConfigurationSwapper, which handles the serialization and deserialization of the SQLParserRuleConfiguration, specifically managing cache options for parse trees and SQL statements.
shardingsphere-sql-parser-core · high confidence
Security
Secure YAML parsing with strict validation and dependency hardening
The agent's YAML configuration loading has been replaced by a new AgentYamlEngine and AgentYamlConstructor that enforce stricter security constraints. The new constructor validates that map keys are not null or blank and restricts class instantiation to the expected root configuration class, preventing arbitrary object construction. Additionally, the underlying SnakeYAML LoaderOptions now explicitly disable duplicate keys, cap alias usage for collections, and set a code point limit. This change aligns with the update to ElasticJob 3.0.4, which addresses CVEs related to SnakeYAML, ensuring that agent configuration files are parsed safely against known vulnerabilities.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/yaml · high confidence
API
Authority rule configuration API and validation
The authority API module now exposes a new \AuthorityRuleConfiguration\ that manages users, a privilege provider, and authenticators, alongside a dedicated \UserConfiguration\ class. The \PrivilegeProvider\ SPI has been updated to accept a \Grantee\ object for privilege checks, and the configuration classes are now validated using Bean Validation to ensure required fields are present and SPI types exist.
kernel/authority/api · high confidence
New cluster-mode repository API interfaces
The cluster-mode repository module now exposes a new public API consisting of the \ClusterPersistRepository\ interface, its configuration class \ClusterPersistRepositoryConfiguration\, and supporting types including the \DataChangedEventListener\, \DistributedLock\, and \ClusterRepositoryPersistException\. This defines the contract for cluster persistence operations such as initializing the registry center, persisting ephemeral data, watching for changes, and acquiring distributed locks, replacing previous internal or less structured approaches.
mode/type/cluster/repository/api · high confidence
New proxy frontend SPI interfaces for authentication and command execution
The proxy/frontend/spi module now exposes new SPI interfaces that define the contract for frontend protocol handling. This includes the AuthenticationEngine for managing connection handshakes and user authentication, the CommandExecuteEngine for routing and executing database commands, and the CommandExecutor/QueryCommandExecutor interfaces for processing individual command results. These interfaces are anchored by the DatabaseProtocolFrontendEngine, which serves as the main entry point for database-specific protocol implementations, providing access to codec engines, authentication logic, and command execution capabilities.
proxy/frontend/spi · high confidence
Architecture
JDBC driver module restructured with new entry points and executor architecture
The JDBC driver module has been reorganized to introduce a cleaner public API and a more modular execution engine. Users can now create data sources programmatically via the new \ShardingSphereDataSourceFactory\ or load them from YAML configuration using \YamlShardingSphereDataSourceFactory\. Internally, the driver's execution logic has been refactored into a new \DriverExecuteExecutor\ engine that coordinates statement execution, push-down operations, and transaction handling through a dedicated callback system, replacing the previous monolithic implementation.
jdbc · high confidence
MySQL parser grammar files relocated to new engine package structure
The ANTLR grammar definitions for the MySQL dialect (including Alphabet, BaseRule, Comments, DALStatement, DCLStatement, DDLStatement, DMLStatement, Keyword, LCLStatement, Literals, MySQLKeyword, Symbol, TCLStatement, and the main MySQLStatement entry point) have been moved from the previous location into the new \parser/sql/engine/dialect/mysql\ directory. This change reflects the broader module reorganization where the parser-sql-dialect module was moved into shardingsphere-parser-sql-engine, and the package was renamed to \org.apache.shardingsphere.sql.parser.engine\. The grammar files themselves remain functionally identical, serving as the foundational parsing rules for MySQL SQL statements within the updated engine architecture.
parser/sql/engine/dialect/mysql · high confidence
PostgreSQL SQL parser grammar and implementation relocated to engine module
The PostgreSQL SQL parser grammar files (ANTLR .g4) and Java implementation classes have been moved from the \parser/sql/dialect/postgresql\ module into the \parser/sql/engine/dialect/postgresql\ module. This change reorganizes the parser's internal structure by consolidating dialect-specific parsing logic into the engine layer, but does not alter the SQL parsing capabilities or behavior for users.
parser/sql/engine/dialect/postgresql · high confidence
Refactored SQL Federation compiler into a modular, pluggable architecture
The SQL Federation compiler module has been restructured to support pluggable Calcite and NONE providers, introducing a new \SQLFederationCompilerEngine\ and \SQLStatementCompilerEngine\ to manage compilation and execution plan caching. This change replaces the previous monolithic compiler logic with a cleaner separation of concerns, including dedicated factories for compiler engines and context builders, while maintaining the core capability to compile SQL statements into optimized Calcite execution plans.
kernel/sql-federation/compiler · high confidence
Refactored agent core to use new builder and executor architecture
The agent core module has been restructured to improve modularity and maintainability. The transformer logic has been moved from the \transformer\ package to a new \builder\ package, introducing \AgentTransformer\ and \AgentJunction\ to handle class transformation and configuration matching. Additionally, advice execution has been refactored into dedicated executor classes (\ConstructorAdviceExecutor\, \InstanceMethodAdviceExecutor\, \StaticMethodAdviceExecutor\) that implement a consistent \AdviceExecutor\ interface, replacing the previous monolithic or less structured execution model. This change also includes the introduction of \AgentBuilderInterceptChainEngine\ and related interceptors to manage the interception chain during class enhancement.
shardingsphere-agent-core · high confidence
Relocate Proxy YAML configuration and isolate public DistSQL
The proxy configuration loading logic has been moved into the \proxy/backend/core\ module, introducing a new configuration structure that separates global server settings (\global.yaml\) from per-database definitions (\database-\.yaml\). This change replaces the legacy \server.yaml\ and \config-\.yaml\ file patterns (while maintaining backward compatibility) and introduces Bean Validation to enforce constraints, such as preventing data source name conflicts between global and database configurations. Additionally, the \AdvancedProxySQLExecutor\ interface is added to standardize SQL execution within this new backend core context.
proxy/backend/core · high confidence
Behavioural changes
Add JVM configuration for Maven builds
A new .mvn/jvm.config file has been added to define JVM arguments for Maven builds. This configuration sets the maximum heap size to 4GB, limits the Metaspace size to 512MB, disables class data sharing, and enables headless mode for Java AWT.
.mvn · high confidence
Agent core module initialization and validation logic
The agent/core module now contains the central entry point for agent startup and basic validation utilities. ShardingSphereAgent.premain() orchestrates the agent lifecycle by loading plugin and advisor configurations, resolving plugin JARs, and installing the agent instrumentation, while also detecting whether the target application is a ShardingSphere Proxy. AgentPreconditions provides standard state and argument validation helpers used during this initialization process.
agent/core/src/main/java/org/apache/shardingsphere/agent/core · high confidence
Broadcast rule refactored to use case-insensitive table matching and unified routing engines
The broadcast feature now uses case-insensitive sets for table names in configuration and routing, ensuring that table lookups and SQL routing are not affected by letter casing. The routing logic has been restructured into a factory that selects specific engines based on SQL statement type: DDL, DCL, and DAL statements are routed to all data sources, while DML statements use a unicast engine that routes to a single data source (either the first or a random one from the connection context), and SELECT statements use a database-broadcast engine. This change also introduces new rule attributes for table mapping and storage unit unregistration, and updates the YAML configuration and swapper to align with the new structure.
features/broadcast · high confidence
CDC job execution and acknowledgment logic refactored
The CDC job execution flow in \CDCJob\ has been refactored to use \PipelineJobRunnerManager\ for task management and \PipelineRequiredColumnsExtractor\ with rule configurations to determine required columns, improving type safety and configuration handling. Additionally, the \CDCAckId\ class now uses a dedicated \RandomStrings\ utility for generating random identifiers, replacing previous implementations.
shardingsphere-data-pipeline-cdc-core · high confidence
Codex policy harness enforces formal review and strict scope boundaries
The \.codex/harness\ directory now includes a new policy harness that enforces formal review handoffs for code-writing tasks and strict scope boundaries for agent actions. The \cases.toml\ file defines test cases that enforce read-only reviews, prevent scope laundering, and enforce a 10,000-line code size limit. The \code\_handoff\_hook.py\ script requires a formal review with evidence and explicit Git commit commands before allowing code changes to be committed. The \policy-sources.toml\ file defines profiles for different types of tasks (e.g., code-write, code-review) and specifies which policy sources apply to each. The \run.py\ script provides a harness for running synthetic policy canaries to validate these rules. The \semantic-verification.md\ file outlines the process for verifying semantic policy changes. This harness ensures that Codex agents adhere to strict coding standards, review processes, and scope limitations.
.codex/harness · high confidence
Deprecation of the ALL\_PERMITTED privilege provider
The AllPermittedPrivilegeProvider, which granted all privileges to users via the 'ALL\_PERMITTED' type (and its alias 'ALL\_PRIVILEGES\_PERMITTED'), is now marked as deprecated in favor of DatabasePermittedPrivilegeProvider. The provider remains functional and registered via the SPI service file, but users should migrate to the database-scoped provider to avoid future removal.
kernel/authority/provider/simple · high confidence
Explicit DDL commit policy and unified dialect transaction options
The transaction metadata model now explicitly defines how Data Definition Language (DDL) statements are committed via the new \DDLCommitPolicy\ enum (options: \COMMIT\_CURRENT\_TRANSACTION\, \NO\_ADDITIONAL\_COMMIT\). This policy is integrated into the consolidated \DialectTransactionOption\ class, which replaces the previous separate \XADataSourceDefinition\ and \TransactionalErrorAllowedSQLStatementHandler\ logic. Users benefit from clearer, dialect-specific control over DDL commit behavior and transaction error handling (such as returning rollback statements on commit failure) within a single, unified configuration object.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/metadata/option/transaction · high confidence
Hive SQL parser statement classes now initialize routing attributes in constructors
The Hive SQL parser statement classes in the \parser/sql/statement/dialect/hive\ module have been refactored to initialize their routing attributes directly within their constructors. Specifically, statements such as \HiveShowConnectorsStatement\, \HiveShowFunctionsStatement\, \HiveShowMaterializedViewsStatement\, \HiveShowPartitionsStatement\, \HiveShowTblpropertiesStatement\, \HiveShowTablesExtendedStatement\, and \HiveShowViewsStatement\ now instantiate and assign a \TablelessDataSourceBroadcastRouteSQLStatementAttribute\ during construction. This change consolidates attribute initialization into the statement objects themselves, replacing previous patterns that relied on separate \buildAttributes\ methods, thereby streamlining the parser's internal object creation process.
parser/sql/statement/dialect/hive · high confidence
Inline expression parser now defaults to LITERAL mode under GraalVM Native Image
The \InlineExpressionParserFactory\ in the \infra/expr/entry\ module now automatically selects the \LITERAL\ parser implementation instead of \GROOVY\ when running under GraalVM Native Image. This behavioral change prevents compilation errors related to Groovy closure classes in native builds, ensuring that inline expressions are processed as literal strings in that environment while retaining the default Groovy behavior for standard JVM runs.
infra/expr/entry · high confidence
Introduce Bean Validation for rule configuration and new configuration models
The infrastructure module now enforces Bean Validation (via Apache BVal) on rule configurations before they are persisted or applied, ensuring that required fields (e.g., key generator names, logic tables) are present and valid. This is supported by new configuration interfaces and classes, including \DatabaseConfiguration\ (with \DataSourceGeneratedDatabaseConfiguration\ and \DataSourceProvidedDatabaseConfiguration\ implementations), \KeyGenerateStrategiesConfiguration\, and scoped rule interfaces (\DatabaseRuleConfiguration\, \GlobalRuleConfiguration\). Additionally, new temporary configuration properties have been added to control metadata collection (\proxy-meta-data-collector-enabled\), system schema assembly (\system-schema-metadata-assembly-enabled\), instance connection (\instance-connection-enabled\), and metadata identifier case sensitivity (\metadata-identifier-case-sensitivity\).
infra/common · high confidence
Introduce Java-based JDBC example generator with isolated cluster namespaces
The example generator now uses a new Java implementation (JDBCExampleGenerator) instead of the previous template-based approach. This change introduces isolated cluster example namespaces per matrix combination, ensuring that generated examples for different modes, transactions, frameworks, and features have distinct namespaces to prevent conflicts. Users will see generated examples organized under specific paths based on these combinations, with output paths determined by configuration or system properties.
shardingsphere-jdbc-example-generator · high confidence
Introduce PluginLifecycleService interface for plugin lifecycle management
The agent API now exposes the PluginLifecycleService interface, which extends AutoCloseable and defines the contract for plugin lifecycle operations. This interface includes a start method to initialize plugins with configuration and proxy enhancement flags, a getType method to identify the plugin, and a default close method for cleanup, replacing the previous PluginBootService abstraction.
agent/api/src/main/java/org/apache/shardingsphere/agent/spi · high confidence
Introduce annotation-driven node path model and engine
The mode node module now uses a new type-safe model for cluster metadata paths. Node paths are defined as classes implementing the NodePath interface and annotated with @NodePathEntity, which specifies the path template (e.g., /metadata/${databaseName}). A new engine in the mode.node.path.engine package handles these paths: NodePathGenerator converts path objects into strings by resolving template variables via reflection, while NodePathSearcher enables pattern-based searching and matching against stored paths using criteria that define search examples and group indices. This replaces the previous manual string concatenation and regex parsing with a structured, reusable approach for database, schema, table, rule, and statistics paths.
mode/node · high confidence
Introduce database-level privilege checking implementation
The database authority provider now includes a concrete implementation for checking database-level permissions. The new \DatabasePermittedPrivileges\ class implements the \ShardingSpherePrivileges\ interface to determine if a user has access to a specific database, supporting both explicit database names and a wildcard for broad access.
shardingsphere-authority-database · high confidence
Introduce dialect-specific data type option interface and default implementation
The database connector now defines a \DialectDataTypeOption\ interface and a \DefaultDataTypeOption\ implementation to standardize how data types are classified. This change allows the system to determine whether a SQL type is an integer, string, or binary type, and to resolve extra SQL type classes, providing a consistent foundation for dialect-specific data type handling.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/metadata/option/datatype · high confidence
Introduce dialect-specific database metadata options
The connector now exposes granular, dialect-specific metadata options through new interfaces and classes (such as DialectIndexOption, DialectSQLOption, and DialectProtocolVersionOption) within the metadata package. This change allows the system to accurately reflect database-specific capabilities, including index name length limits, whole-row projection support, and protocol version defaults, ensuring that SQL generation and schema handling align with the target database's actual features.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/metadata · high confidence
Introduction of AgentPluginEnable interface
A new \AgentPluginEnable\ interface has been added to the agent API, defining a \isPluginEnabled()\ method that allows individual plugins to expose their enabled status. This change supports the broader refactoring where plugin enablement logic is moved from a central check to each specific advice implementation.
agent/api/src/main/java/org/apache/shardingsphere/agent/api/plugin · high confidence
Kernel processor now rejects unsupported temporary table DDL operations
The KernelProcessor in the connection kernel module now explicitly validates SQL statements before execution and throws an UnsupportedSQLOperationException when it encounters CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statements. This check occurs early in the execution context generation phase, ensuring that temporary table operations are blocked regardless of whether metadata validation is skipped via hints. The change also includes unit tests verifying this rejection behavior for both create and drop temporary table scenarios.
infra/context · high confidence
MCP Registry metadata validation and command-line tooling
The MCP registry now includes a new command-line tool and validation logic to enforce strict metadata requirements for Model Context Protocol server definitions. Users must now ensure their server.json files contain exactly one stdio and one streamable-http OCI package, with the streamable-http transport defining a URL and a docker runtime hint exposing port 18088 on 127.0.0.1. Additionally, release versions cannot contain 'SNAPSHOT', and specific environment variable configurations (like SHARDINGSPHERE\_MCP\_CONFIG) must be non-secret and string-formatted. A new validator also checks that associated Dockerfiles define specific ARG and LABEL instructions for server name and image version.
mcp/registry · high confidence
MySQL SHOW statements now strip the FROM database segment during rewriting
The MySQL rewrite dialect now includes a provider that removes the FROM database segment from SHOW statements (SHOW TABLES, SHOW COLUMNS, SHOW INDEX, SHOW TABLE STATUS) before execution. This ensures that these metadata queries are rewritten to target the correct database context rather than the one specified in the original SQL, which is essential for correct behavior in sharded environments. A corresponding test verifies this segment removal logic.
infra/rewrite/dialect/mysql · high confidence
MySQL and PostgreSQL DAL statement routing behavior updated
The routing logic for Data Administration Language (DAL) statements has been refined for MySQL and PostgreSQL. For MySQL, resource group management statements (CREATE/ALTER/DROP/SET RESOURCE GROUP) are now routed as instance broadcasts, and SHOW VARIABLES is routed as a data source unicast, while other statements default to no broadcast; statements marked with the AllowNotUseDatabase attribute also trigger instance broadcasting. For PostgreSQL, RESET PARAMETER and LOAD statements are routed as data source broadcasts. These changes ensure that specific administrative commands are executed on the correct nodes within a sharded or distributed topology.
infra/route/dialect/mysql · high confidence
MySQL incremental ingestion now validates binlog settings and correctly handles unsigned integer types
The MySQL data pipeline now ensures replication prerequisites are met by checking that LOG\_BIN is ON, BINLOG\_FORMAT is ROW, and BINLOG\_ROW\_IMAGE is FULL before starting. Additionally, incremental binlog ingestion now correctly converts MySQL unsigned integer values (TINYINT, SMALLINT, MEDIUMINT, INT, and BIGINT) to their proper positive equivalents, preventing negative value errors during data synchronization.
kernel/data-pipeline/dialect/mysql · high confidence
MySQL incremental ingestion refactored with new JDBC properties and binlog event models
The MySQL data-pipeline dialect now uses a dedicated MySQLJdbcQueryPropertiesExtension to configure the JDBC connection, explicitly disabling server-side prepared statements (useServerPrepStmts=false) and setting netTimeoutForStreamingResults to 600 seconds. It also adapts the zeroDateTimeBehavior based on the detected MySQL Connector/J version (using CONVERT\_TO\_NULL for version 8.0.0+). Additionally, the incremental ingestion layer introduces a new set of binlog event classes (MySQLBaseBinlogEvent, MySQLQueryBinlogEvent, MySQLBaseRowsBinlogEvent, MySQLDeleteRowsBinlogEvent, MySQLUpdateRowsBinlogEvent, MySQLWriteRowsBinlogEvent, and MySQLXidBinlogEvent) to model MySQL binary log events, supported by a MySQLServerVersion utility for version parsing.
shardingsphere-data-pipeline-mysql · high confidence
MySQL proxy admin executors and dialect-specific result handling
The MySQL proxy backend now uses a dedicated set of admin executors to handle MySQL-specific administrative commands and metadata queries. This includes \MySQLAdminExecutorCreator\ to route \SET\ variables, \KILL\, and \USE DATABASE\ to specialized handlers like \MySQLSetVariableAdminExecutor\ (which enforces charset/collation rules and validates client character sets), \MySQLKillProcessExecutor\ (supporting \KILL QUERY\), and \MySQLUseDatabaseExecutor\ (with authority checks). Additionally, dialect-specific engines handle system variable queries (\MySQLSystemVariableQueryExecutor\), \information\_schema.schemata\ lookups (\SelectInformationSchemataExecutor\), and special cases like \connection\_id()\ and \DATABASE()\. The \MySQLDialectSaneQueryResultEngine\ ensures that multi-expression selects without a FROM clause return a valid result set, and \MySQLStatementMemoryStrictlyFetchSizeSetter\ applies the configured backend query fetch size to MySQL JDBC statements.
proxy/backend/dialect/mysql · high confidence
New MySQL DDL statement visitor consolidates parsing logic
The MySQL parser now uses a dedicated \MySQLDDLStatementVisitor\ to handle Data Definition Language statements. This new visitor centralizes the parsing logic for a wide range of DDL operations—including \CREATE\, \ALTER\, and \DROP\ for tables, indexes, views, procedures, functions, triggers, databases, and tablespaces—as well as related commands like \ANALYZE TABLE\, \EXPLAIN\, and \PREPARE\/\EXECUTE\/\DEALLOCATE\. This change improves the structural organization of the parser and ensures consistent handling of these schema-modifying statements.
shardingsphere-parser-sql-engine-mysql · high confidence
New YAML configuration swapper for SQL Federation rule
A new swapper class has been added to handle the conversion between YAML configuration and the internal SQL Federation rule configuration object. This component ensures that settings such as 'all query use SQL federation', execution plan cache options, and provider type are correctly persisted and loaded from YAML files, supporting the pluggable provider architecture and default fallback behaviors introduced in recent updates.
shardingsphere-sql-federation-core · high confidence
New driver-side executors and refactored metadata handling
The JDBC driver now includes dedicated executors for batch SQL execution (BatchStatementExecutor) and transaction control statements like savepoints (DriverTransactionSQLStatementExecutor), alongside a new cache for driver data sources (DriverDataSourceCache). Additionally, the DatabaseMetaDataResultSet implementation has been refactored to leverage the new DataNodeRuleAttribute for resolving logic table names, improving how metadata is presented to applications.
shardingsphere-jdbc · high confidence
OpenGauss dialect backend refactored with dedicated admin executors and SPI registrations
The OpenGauss proxy backend now uses a dedicated admin executor creation flow: OpenGaussAdminExecutorCreator delegates SELECT-based admin queries to OpenGaussSelectAdminExecutorFactory, which routes system function queries (VERSION, gs\_password\_deadline, gs\_password\_notifytime) to specific executors and system table queries to OpenGaussSystemTableQueryExecutorFactory, while falling back to PostgreSQL for other cases. SHOW VARIABLE commands are handled by OpenGaussShowVariableExecutor, which supports sql\_compatibility and delegates other variables to PostgreSQL. Query headers for openGauss now use OpenGaussQueryHeaderBuilder to resolve composite type OIDs via OpenGaussColumnTypeOIDResolver. A new OpenGaussStatementMemoryStrictlyFetchSizeSetter enforces memory-strict fetch size behavior, and OpenGaussJDBCResultMetadataChecker is registered via SPI to validate composite result columns across storage units. Tests cover fetch size setting, metadata checking, and admin executor creation.
proxy/backend/dialect/opengauss · high confidence
OpenTelemetry tracing plugin lifecycle service initialization
The OpenTelemetry tracing plugin now initializes its lifecycle service by configuring system properties from the plugin configuration and starting the AutoConfigured OpenTelemetry SDK. This ensures that tracing is properly set up with the specified configuration when the agent enhances the proxy or application.
agent/plugins/tracing/type/opentelemetry/src/main/java/org/apache/shardingsphere/agent/plugin/tracing/opentelemetry · high confidence
Oracle projection identifier extraction now normalizes identifiers to uppercase
The Oracle dialect binder now uses a dedicated \OracleProjectionIdentifierExtractor\ to handle projection identifiers, ensuring that identifiers, function expressions, and subquery text are converted to uppercase. This change also introduces specific handling for NULL literals, returning the string "NULL" when a literal expression is null, which aligns with Oracle's case-insensitive identifier behavior and prevents potential null pointer exceptions during projection binding.
infra/binder/dialect/oracle · high confidence
PostgreSQL binder now correctly handles identifier case folding and Unicode quoting
The PostgreSQL binder now implements proper identifier handling for projections and function names. Unquoted identifiers are folded to lowercase using ASCII-only rules (avoiding locale-specific issues like the Turkish dotless i), and Unicode-quoted identifiers (U&"...") are correctly unquoted and decoded, including escape sequences. This ensures that column labels and function references in query results match PostgreSQL's native behavior, fixing issues where case sensitivity or Unicode escapes were previously mishandled.
infra/binder/dialect/postgresql · high confidence
PostgreSQL extended query protocol implementation and performance fix
The PostgreSQL frontend module now implements the extended query protocol (Parse, Bind, Execute, Close, Sync) via new command executors and a portal context registry, enabling support for prepared statements and batched operations. A performance fix for JDK 8 avoids a ConcurrentHashMap\#computeIfAbsent bottleneck in the portal context registry. Additionally, the module has been renamed from shardingsphere-proxy-frontend-type to shardingsphere-proxy-frontend-dialect, and PostgreSQLColumnType has been renamed to PostgreSQLBinaryColumnType.
shardingsphere-proxy-frontend-postgresql · high confidence
PostgreSQL incremental pipeline refactors and JSON type fix
The PostgreSQL data-pipeline module has been restructured with new classes for JDBC query properties, WAL event handling, and DDL template execution, alongside package renames and normalizations. A specific fix ensures that PostgreSQL JSON types are correctly supported during migration, preventing failures when handling this data type.
shardingsphere-data-pipeline-postgresql · medium confidence
Prometheus plugin registers via Java SPI
The Prometheus metrics plugin now registers its factory and lifecycle services through Java Service Provider Interface (SPI) files. This ensures the PrometheusMetricsCollectorFactory and PrometheusPluginLifecycleService are automatically discovered and initialized by the agent framework without manual configuration.
agent/plugins/metrics/type/prometheus/src/main/resources/META-INF/services · high confidence
Readwrite-splitting configuration model refactored to use data source groups
The readwrite-splitting rule configuration has been restructured to organize data sources into explicit groups via the new \ReadwriteSplittingDataSourceGroupRuleConfiguration\. Users now define \dataSourceGroups\ (each specifying a write source, a list of read sources, and a transactional read query strategy) and a separate \loadBalancers\ map, replacing the previous flat configuration structure. This change introduces Bean Validation for rule configurations and adds a \TransactionalReadQueryStrategy\ enum (PRIMARY, FIXED, DYNAMIC) to control read routing behavior within transactions.
features/readwrite-splitting · high confidence
Redesigned Encrypt Rule Configuration API with Bean Validation
The encrypt feature introduces a new configuration structure for \EncryptRuleConfiguration\, replacing the previous model with a stricter, validated schema. The rule now explicitly defines \tables\ (each containing \columns\ with distinct \cipher\, \assistedQuery\, and \likeQuery\ items) and \encryptors\ (a map of algorithm configurations). This change enforces validation at the configuration entry point, ensuring that encryptor types exist as SPI implementations, table names are unique, and derived column names (assisted/like query) do not conflict with logic column names. The \EncryptAlgorithm\ SPI has also been updated to include metadata about support capabilities (decrypt, equivalent filter, like) and encoder handling, providing a more robust foundation for algorithm configuration.
features/encrypt · high confidence
Refactor database connector core with new identifier policy and connection properties
The database connector core module has been restructured to improve modularity and clarity. A new \IdentifierCasePolicy\ class replaces the previous identifier case rule, centralizing logic for identifier normalization and lookup modes based on quote characters. Connection handling is simplified by introducing a new \ConnectionProperties\ class that consolidates hostname, port, catalog, schema, and query properties, replacing the previous split between \StandardJdbcUrl\ and \StandardConnectionProperties\. Additionally, a \SchemaTableMetaDataAggregator\ has been added to handle table metadata aggregation and validation, ensuring uniform table structures across data nodes when enabled. Package names have also been updated to reflect the new \database.connector\ namespace.
shardingsphere-database-connector-core · high confidence
Refactor dialect function option interface and add default implementation
The \DialectFunctionOption\ interface has been refactored to define \getUnparenthesizedFunctionNames\ as an abstract method while moving the default implementation of \getUnparenthesizedQualifiedFunctionNames\ to the interface itself. A new \DefaultFunctionOption\ class has been introduced to provide a concrete implementation that returns an empty set for unparenthesized function names, establishing a baseline for dialect-specific function handling.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/metadata/option/function · high confidence
Refactor generated key option handling with new interface and default implementation
The database connector now uses a new \DialectGeneratedKeyOption\ interface and a \DefaultGeneratedKeyOption\ class to manage how auto-increment keys are handled. This change introduces a specific method, \isGeneratedKeyTriggerValue\, allowing the system to determine whether an explicitly provided insert value should trigger the database's auto-increment mechanism, addressing previous issues with incorrect key generation for explicit values.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/database/metadata/option/keygen · high confidence
Refactor metrics collection to use SPI-based factory and registry
The metrics collection mechanism in the agent core has been refactored to use a Service Provider Interface (SPI) pattern. A new \MetricsCollector\ interface defines the contract for collectors, while \MetricsCollectorFactory\ extends \PluginTypedSPI\ to allow pluggable implementations. A \MetricsCollectorRegistry\ now manages these collectors, using \PluginServiceLoader\ to instantiate them based on configuration and plugin type, replacing previous hardcoded or YAML-based initialization logic.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/collector · high confidence
Refactor openGauss incremental ingestion and JDBC properties handling
The openGauss data-pipeline module has been restructured to improve code organization and maintainability. A new \OpenGaussJdbcQueryPropertiesExtension\ class now explicitly manages JDBC query properties (such as \stringtype\ and \bitToString\) for openGauss connections, replacing previous implicit or scattered configuration. Additionally, the incremental WAL (Write-Ahead Log) ingestion logic has been refactored, introducing a dedicated \OpenGaussLogSequenceNumber\ class that wraps the underlying openGauss replication log sequence number, aligning the package structure and class hierarchy with the broader PostgreSQL incremental ingestion patterns.
shardingsphere-data-pipeline-opengauss · high confidence
Refactored DistSQL handler package ownership and engine structure
The DistSQL handler module has been reorganized to improve separation of concerns and maintainability. The package layout was renamed from \distsql.handler.type\ to \distsql.handler.engine\, and a new \constant\ package was introduced containing \DistSQLConstants\ for shared literals like commas and semicolons. The execution logic was split into dedicated query and update engines (\DistSQLQueryExecuteEngine\ and \DistSQLUpdateExecuteEngine\), which now utilize new helper classes such as \DatabaseNameUtils\ for resolving database contexts and \DistSQLExecutorAwareSetter\ for injecting connection, database, and rule awareness into executors. Rule definition updates are now managed through specific factories (\DatabaseRuleDefinitionExecutorFactory\, \GlobalRuleDefinitionExecutorFactory\) and operator classes (\CreateDatabaseRuleOperator\, \AlterDatabaseRuleOperator\, \DropDatabaseRuleOperator\), replacing the previous monolithic update logic. Additionally, a new \DistSQLConnectionContext\ was added to encapsulate connection-related state, and \DistSQLExecutorRequiredChecker\ was introduced to enforce pre-execution checks for cluster mode and required rules.
infra/distsql-handler · high confidence
Refactored JDBC URL handling with dialect-specific SPIs
The JDBC URL processing logic in the connector core has been restructured to support database-specific behaviors through new Service Provider Interfaces (SPIs). This change introduces \DialectJdbcUrlFetcher\ and \DialectDefaultQueryPropertiesProvider\ to decouple dialect-specific URL fetching and default query property logic from the core \ConnectionProperties\ class. Additionally, a new \JdbcUrlAppender\ utility is provided to safely merge query parameters into JDBC URLs, handling conflicts and delimiters automatically. The \DatabaseInstanceJudgeEngine\ now delegates instance comparison to dialect-specific \DialectDatabaseInstanceJudger\ implementations, allowing for custom logic per database type while retaining a standard fallback.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/jdbcurl · high confidence
Refactored JDBC example generator with SPI-based scenario composition
The example generator tool has been restructured to use a modular, SPI-driven architecture for composing generated code. Instead of a monolithic generation process, it now uses \ExampleScenarioFactory\ to combine \FeatureExampleScenario\ implementations (such as sharding, encryption, masking, readwrite-splitting, and shadow) with \FrameworkExampleScenario\ implementations (including plain JDBC, Spring Boot starters for JDBC/JPA/MyBatis, and Spring Namespace configurations). This change allows the generator to dynamically assemble the correct Java classes, resource files, and directory structures based on the selected feature and framework combination, improving maintainability and extensibility of the generated sample projects.
examples/shardingsphere-jdbc-example-generator · high confidence
Refactored MySQL protocol codec and added low-level packet handling
The MySQL protocol module has been refactored to improve packet encoding and decoding reliability. A new \MySQLPacketCodecEngine\ replaces the previous logic, using a do-while loop to correctly aggregate pending messages and handle multi-packet responses. The \MySQLPacketPayload\ class now includes \writeInt6\ support for 6-byte integers, which is utilized by the new \MySQLBinlogRowsEventPacket\ to correctly parse binlog table IDs. Additionally, the \MySQLComStmtExecutePacket\ now explicitly handles STRING parameter decoding for numeric columns and ensures correct signedness for prepared statement parameters, addressing previous data corruption issues in the Proxy.
shardingsphere-database-protocol-mysql · high confidence
Refactored SQL binder context creation and statement context extraction
The SQL binder's context creation logic has been restructured to use a new \SQLStatementContextFactory\ that routes parsed statements to specific context types (e.g., \SelectStatementContext\, \InsertStatementContext\) based on statement category and dialect-specific warping rules. Additionally, a new \SQLStatementContextExtractor\ centralizes the retrieval of table names, where segments, and column segments across subqueries, while new context classes like \InsertValueContext\ and \OnDuplicateUpdateContext\ improve how insert values and parameters are bound and accessed.
infra/binder/core · high confidence
Refactored SQL federation executor with new context and enumerable components
The SQL federation executor has been restructured to simplify engine logic and improve resource management. A new ExecutorContext now centralizes execution state, including connection offsets and preview mode detection, while ExecutorBindContext provides a DataContext implementation for the Calcite relational converter. The execution flow now utilizes EnumerableScanImplementor to route queries to either JDBC or in-memory enumerators, with dedicated JDBCDataRowEnumerator and MemoryDataRowEnumerator classes handling row iteration. A key behavioral improvement ensures that all JDBC statements are properly closed during enumeration cleanup, even if intermediate failures occur, with subsequent exceptions suppressed to prevent resource leaks.
kernel/sql-federation/executor · high confidence
Refactored SQL parser engine with dedicated cache management and dynamic cache updates
The SQL parser infrastructure in \infra/parser\ has been restructured to improve cache handling and engine lifecycle. A new \SQLParserEngine\ interface and \ShardingSphereSQLParserEngine\ implementation now coordinate between SQL and DistSQL parsing, with the latter falling back to DistSQL parsing when standard SQL parsing fails. Cache logic has been extracted into a dedicated \cache\ package containing \CacheManager\, \SQLStatementCacheBuilder\, and \SQLStatementCacheLoader\, decoupling cache construction from the parser engine. The \SQLStatementParserEngine\ now supports dynamic cache option updates via \updateCacheOption\, allowing runtime adjustments to cache sizes and policies without recreating the engine. The \SQLStatementParserEngineFactory\ manages engine instances per \DatabaseType\ and applies cache updates when options change.
infra/parser · high confidence
Refactored advisor configuration model and loader
The agent's advisor configuration system has been refactored to use a new set of model classes (AdvisorConfiguration, MethodAdvisorConfiguration) and a centralized loader (AdvisorConfigurationLoader). This change consolidates how advisor configurations are loaded from plugin JARs, merging configurations by target class name and plugin type, and improves resource handling by ensuring input streams are properly closed and logging warnings when configuration files are missing.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/advisor/config · high confidence
Refactored cluster mode context initialization and metadata change dispatch
The cluster mode context manager builder now initializes the cluster repository, worker ID generator, and exclusive operator engine before constructing the metadata context, and registers online compute nodes and deliver event subscribers immediately upon startup. Additionally, a new set of dispatch handlers has been introduced to process database-level metadata changes (schemas, tables, views), storage unit updates, and rule configuration alterations, ensuring that in-memory metadata and statistics are refreshed asynchronously in response to persisted events.
mode/type/cluster/core · high confidence
Refactored data pipeline core with new consistency check and execution engines
The data pipeline core module has been refactored to improve data consistency checking and execution flexibility. A new \DataMatchTableDataConsistencyChecker\ implements the DATA\_MATCH strategy, allowing configuration of chunk sizes and streaming range types, and correctly handles tables without unique keys by marking them as ignored. The pipeline execution engine (\PipelineExecuteEngine\) now supports both cached and fixed thread pools with callback handling. Inventory calculation logic has been restructured into a streaming architecture (\AbstractStreamingTableInventoryCalculator\) to handle large datasets more efficiently, supporting single and multi-column unique keys. Additionally, a new \UniqueKeyIngestPosition\ class replaces previous primary key position types, supporting integer, string, and binary (e.g., MySQL VARBINARY) types for more precise data ingestion positioning.
shardingsphere-data-pipeline-core · high confidence
Refactored database type detection and SPI loading infrastructure
The database connector core now uses a new SPI-based architecture for identifying and loading database-specific behaviors. A new \DatabaseType\ interface defines JDBC URL prefixes and trunk-type relationships, while \DatabaseTypeFactory\ handles detection by matching URLs or falling back to dialect-specific fetchers when metadata is unavailable. The \DatabaseTypedSPILoader\ enables service discovery that respects this trunk/branch hierarchy, and \DatabaseTypeRegistry\ now exposes branch types alongside dialect metadata. This change replaces previous branch-aware detection logic with a cleaner, metadata-fallback approach.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/type · high confidence
Refactored encryption rewrite and metadata handling
The encryption module has been refactored to improve SQL rewriting and metadata consistency. SHOW COLUMNS now correctly maps cipher columns back to their logic names via a new EncryptShowColumnsMergedResult. DDL statements (CREATE/ALTER TABLE) are rewritten to automatically generate the necessary cipher, assisted query, and like query columns. Predicate parameter rewriting is centralized in a new EncryptConditionEngine and EncryptPredicateParameterRewriter, which handle encryption for WHERE clauses and INSERT...SELECT statements. Additionally, metadata revisers ensure that index and column names in the metadata layer reflect the logic column names rather than the underlying cipher columns.
shardingsphere-encrypt-core · high confidence
Refactored merge engine to separate result merging and decoration logic
The merge engine in the infra/merge module has been restructured to explicitly distinguish between merging query results and decorating them. A new ResultProcessEngine SPI hierarchy now manages both ResultMergerEngine (for combining data) and ResultDecoratorEngine (for post-processing, such as encryption or masking). The MergeEngine orchestrates this by first executing the appropriate merger based on registered rules, then applying a chain of decorators to the merged result. This separation allows rules to independently contribute merging or decorating capabilities without interfering with each other, simplifying the addition of new result transformations.
infra/merge · high confidence
Refactored metadata loading with storage-aware fallback and case-insensitive support
The metadata loading logic in the connector core has been restructured to improve reliability and identifier handling. A new storage-aware schema fallback mechanism ensures that if a dialect-specific metadata loader fails, the system gracefully falls back to a default loading strategy. Additionally, table name handling has been simplified and normalized to support case-insensitive lookups, ensuring consistent metadata resolution across different database types.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/data · high confidence
Refactored metadata management and event handling in mode-core
The mode-core module has been restructured to improve metadata handling and event propagation. A new DataChangedEvent class has been introduced to standardize data change notifications. MetaDataContexts now centrally manages both ShardingSphereMetaData and ShardingSphereStatistics using thread-safe atomic references, with updates delegating to a MetaDataPersistFacade. Resource switching logic is now encapsulated in a new SwitchingResource class that handles the lifecycle of new and stale data sources. Additionally, metadata refreshers for CREATE and ALTER TABLE operations have been refactored to use a push-down model, improving how schema changes are persisted and synchronized.
shardingsphere-mode-core · high confidence
Refactored proxy metrics collection into granular advice classes
The proxy metrics collection logic has been restructured into specific advice classes to improve modularity and precision. \CommitTransactionsCountAdvice\ and \RollbackTransactionsCountAdvice\ now separately track transaction outcomes under the \proxy\_transactions\_total\ metric using a \type\ label. Connection tracking is handled by \CurrentConnectionsCountAdvice\, which increments or decrements the \proxy\_current\_connections\ gauge based on channel activity. Command execution metrics are split into \ExecuteLatencyHistogramAdvice\ (recording \proxy\_execute\_latency\_millis\ only for \QueryCommandExecutor\ instances) and \ExecuteErrorsCountAdvice\ (tracking \proxy\_execute\_errors\_total\). Additionally, \RequestsCountAdvice\ manages the \proxy\_requests\_total\ counter. This change replaces the previous monolithic advice with specialized components for each metric aspect.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/proxy · high confidence
Refactored transaction core with new rule builder and savepoint management
The transaction core module has been restructured to introduce a new rule builder framework (TransactionRuleBuilder and DefaultTransactionRuleConfigurationBuilder) and a dedicated savepoint management system (ConnectionSavepointManager with MySQL-specific SQL provider). The TransactionRule now initializes the ShardingSphereTransactionManagerEngine using a collection of databases rather than a map, and enforces a 45-character limit on unique resource names. Additionally, AutoCommitUtils now determines transaction start needs based on DDL/DML statements while excluding SELECTs without a FROM clause, and implicit transaction callbacks are supported via the new ImplicitTransactionCallback interface.
kernel/transaction/core · high confidence
Refined SQL routing and parsing metrics with database and type labels
The metrics advice components in the agent have been refactored to provide more granular observability for SQL operations. The \routed\_sql\_total\ metric now includes a \database\ label and is split by SQL type, allowing users to track routing counts per database and statement category. Similarly, the \parsed\_sql\_total\ metric is now labeled by SQL type. New advice classes (\RouteResultCountAdvice\, \SQLParseCountAdvice\, \SQLRouteCountAdvice\) implement these changes, replacing previous implementations to offer clearer insights into how SQL statements are parsed and routed across different databases.
agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice · high confidence
Register FileLoggingPluginLifecycleService via SPI
The file logging plugin now registers its lifecycle service implementation (FileLoggingPluginLifecycleService) through the Java Service Provider Interface (SPI) mechanism. This ensures the agent correctly discovers and manages the lifecycle of the file logging plugin at runtime.
agent/plugins/logging/type/file/src/main/resources/META-INF/services · high confidence
Restructured ShardingSphere-Proxy distribution with optional libraries and included agent
The ShardingSphere-Proxy binary distribution has been reorganized to improve modularity and compliance. The agent is now included by default in the distribution root, while Hive and Seata-AT dependencies are moved to an \opt-lib\ directory and excluded from the main \lib\ folder, allowing users to load them only when needed. The assembly also bundles the standard Apache LICENSE, NOTICE, and third-party license files for legal compliance.
distribution/proxy · high confidence
Restructured data-pipeline RAL statement hierarchy
The data-pipeline distributed SQL statement classes have been refactored into a new package structure to better align with the RAL (Rule Abstraction Layer) type system. A new \PipelineRALStatement\ interface now serves as the base marker, with specialized abstract base classes \QueryablePipelineRALStatement\ and \UpdatablePipelineRALStatement\ extending the corresponding RAL types. This change introduces \AlterTransmissionRuleStatement\ as an updatable statement, enabling users to modify transmission rules within the data pipeline context.
kernel/data-pipeline/distsql/statement · high confidence
SQL Federation execution plan cache configuration and validation
The SQL Federation rule now includes a configurable execution plan cache, defined by \SQLFederationCacheOption\ with \initialCapacity\ and \maximumSize\ parameters. This cache is mandatory in the \SQLFederationRuleConfiguration\ and is validated to ensure positive values; if omitted in YAML, the system falls back to a default cache configuration (initial capacity 2000, maximum size 65535).
kernel/sql-federation/core · high confidence
SQL Parser rule configuration now enforces Bean Validation
The SQL parser rule configuration now validates its settings using Bean Validation. Users must provide non-null cache options for both the parse tree and SQL statement caches; attempting to configure null values or negative capacities/sizes will now result in an InvalidRuleConfigurationException, ensuring that only valid cache parameters are accepted.
kernel/sql-parser/api · high confidence
Shadow rule configuration validation and algorithm SPIs restructured
The Shadow rule configuration API has been refactored to use Bean Validation, introducing stricter checks that require the default shadow algorithm to be of type SQL\_HINT and ensuring all table references point to configured data sources and algorithms. The shadow algorithm SPIs have been split into specialized interfaces for column-based matching (ColumnShadowAlgorithm) and SQL hint-based matching (HintShadowAlgorithm), with corresponding built-in implementations for regex and value matching, providing clearer separation of concerns for shadow routing logic.
features/shadow · high confidence
Sharding rule configuration API restructured with Bean Validation and SPI type checks
The sharding module's configuration API has been refactored to use Bean Validation (JSR-380) for rule configuration objects. \ShardingRuleConfiguration\ and its sub-configurations (e.g., \ShardingTableRuleConfiguration\, \ShardingAutoTableRuleConfiguration\) now include validation annotations (\@NotNull\, \@Valid\, \@SPITypeExists\) to enforce correct structure at load time. This introduces stricter validation for sharding algorithms, key generators, and auditors, ensuring that referenced SPI types exist and that configurations like \actualDataNodes\ do not contain multiple schemas for the same storage unit.
features/sharding · high confidence
Single table rule configuration and validation refactored
The single table rule's configuration handling and validation logic have been restructured to improve reliability and clarity. A new \SingleRuleConfigurationDecorator\ now manages table expansion (including wildcard support) and validates that configured single tables actually exist in the underlying data sources, throwing specific exceptions like \InvalidSingleRuleConfigurationException\ or \SingleTableNotFoundException\ if mismatches occur. Configuration emptiness is now checked via \SingleRuleConfigurationEmptyChecker\. Additionally, SQL validation for DDL operations has been updated: dropping a schema is now blocked if it contains tables (unless \CASCADE\ is used), and dropping a single table with \CASCADE\ is explicitly unsupported, enforced by new \SingleDropSchemaSupportedChecker\ and \SingleDropTableSupportedChecker\ components.
kernel/single/core · high confidence
Snowflake key generator now uses a UTC-based epoch
The Snowflake key generation algorithm now calculates its epoch timestamp in UTC rather than the system's local timezone. This ensures that generated distributed primary keys remain consistent and predictable regardless of the server's timezone configuration, eliminating potential drift or collisions in multi-region deployments.
infra/algorithm/type/key-generator/type/snowflake · high confidence
Standalone exclusive operations now use a local retry-based lock context
The standalone mode now manages exclusive operations via a new StandaloneExclusiveOperatorContext that replaces the previous distributed lock approach. This context uses a local CopyOnWriteArraySet to track active operation keys and employs a RetryExecutor to handle acquisition with a configurable timeout and retry interval, ensuring that exclusive operations are properly tracked and released within the standalone environment.
shardingsphere-standalone-mode-core · high confidence
Support for composite result columns in openGauss routing
The openGauss backend now supports routing queries that return composite result columns to the same storage unit. This is implemented via a new OpenGaussJDBCResultMetadataChecker that delegates validation logic to the existing PostgreSQL checker, ensuring consistent handling of complex result sets for openGauss databases.
shardingsphere-proxy-backend-opengauss · high confidence
Supports case-insensitive table name lookups in single-table metadata
The Single module now handles table identifiers in a case-insensitive manner when loading metadata. A new SingleDataNodeRuleAttribute implementation was introduced to manage data node mappings, specifically overriding getDataNodesByTableName to perform case-insensitive matching against stored table names. This ensures that queries referencing tables with different casing than their actual storage names will still resolve correctly.
shardingsphere-single-core · high confidence
Unified YAML advisors configuration loader
The agent now uses a single, unified YAML file for advisors configuration instead of separate files for file-proxy and file-jdbc. This change is implemented via the new YamlAdvisorsConfigurationLoader, which loads the merged configuration from a single input stream, simplifying the configuration structure for users.
agent/core/src/main/java/org/apache/shardingsphere/agent/core/advisor/config/yaml/loader · high confidence
Unified identifier case-sensitivity handling via policy-based engine
The connector core now manages identifier case sensitivity through a new policy-based engine rather than a single global setting. This change introduces an \IdentifierScope\ enum (covering DATABASE, SCHEMA, TABLE, LOGICAL\_TABLE, VIEW, COLUMN, INDEX, and CONSTRAINT) to allow distinct case-sensitivity rules per metadata level. A new SPI (\IdentifierCasePolicyProvider\) enables database-specific providers to define these rules, while the \IdentifierNormalizeEngine\ applies the appropriate policy during schema name resolution and identifier matching. This allows the system to correctly handle heterogeneous databases with different case-sensitivity requirements (e.g., MySQL's insensitive vs. PostgreSQL's sensitive) by normalizing and looking up identifiers according to the specific scope and database type.
database/connector/core/src/main/java/org/apache/shardingsphere/database/connector/core/metadata/identifier · high confidence
ZooKeeper distributed lock now uses centralized exception handling
The ZooKeeper-based distributed lock implementation has been updated to delegate exception processing to a dedicated \ZookeeperExceptionHandler\. This change ensures that errors occurring during lock acquisition or release are handled consistently, improving reliability and maintainability of cluster-mode operations.
shardingsphere-cluster-mode-repository-zookeeper · high confidence
Fixes
Fix COUNT(\*) handling for Firebird
This change introduces the Firebird-specific projection identifier extractor, ensuring that aggregate functions like COUNT(\*) are correctly resolved to their function name (e.g., 'COUNT') rather than the full expression text. This fixes issues with column label generation for Firebird dialect queries, particularly when projections lack explicit aliases.
infra/binder/dialect/firebird · high confidence
Test coverage
Add base integration tests for YAML rule configuration and node tuple swapping; Added DistSQL rule executor test infrastructure; Added E2E test fixtures for ShardingSphere-Proxy and algorithm SPIs; Added JDBC and Proxy test fixtures for end-to-end agent testing; Added ReflectionFixture test helper class; Added TargetObjectFixture for testing agent instrumentation scenarios; Added end-to-end tests for MCP workflow and functionality scenarios; Added end-to-end tests for SHOW PROCESSLIST operation; Added end-to-end tests for pipeline operations; Added end-to-end tests for the Jaeger tracing plugin; Added end-to-end tests for the Prometheus metrics plugin; Added end-to-end tests for the file logging plugin; Added end-to-end transaction integration tests; Added integration test to verify SPI implementation matching; Added integration tests for Jakarta namespace transformation; Added integration tests for Prometheus plugin lifecycle; Added integration tests for SQL binder; Added integration tests for SQL node converter engine; Added integration tests for SQL router subquery and single-table routing; Added integration tests for data pipeline core components; Added native test infrastructure and fixtures for sharding and encryption algorithms; Added test fixtures for AgentService SPI; Added test fixtures for YAML advisor configuration; Added test fixtures for agent advice lifecycle; Added test fixtures for mocked database infrastructure; Added test fixtures for rule configuration and YAML swapping; Added tests for AdvisorConfigurationLoader; Added tests for H2 metadata loading; Added tests for OpenGauss and PostgreSQL identifier case policy providers; Added tests for Oracle JDBC URL parsing; Added tests for Oracle identifier case policy provider; Added tests for PostgreSQL database metadata configuration; Added tests for PostgreSQL database privilege checking; Added tests for PostgreSQL system database metadata; Added tests for PrometheusMetricsCollectorFactory; Added tests for Sharding MCP descriptor contracts and handler providers; Added tests for coding standards scripts and checkstyle rules; Added tests for dialect-specific system database metadata; Added tests for the MCP Encrypt feature workflow and handlers; Added tests for the MCP readwrite-splitting feature handlers and workflows; Added unit test for MetaDataContextsFactoryAdvice logging; Added unit tests for AdviceExecutorFactory and AdviceFactory; Added unit tests for AgentBuilderFactory and AgentJunction; Added unit tests for AgentPath; Added unit tests for AgentPluginClassLoader and ClassLoaderContext; Added unit tests for AgentReflectionUtils and SQLStatementUtils; Added unit tests for AgentServiceLoader; Added unit tests for ClickHouse JDBC URL parsing; Added unit tests for ClickHouse database metadata and system database behavior; Added unit tests for FileLoggingPluginLifecycleService; Added unit tests for Firebird metadata loaders; Added unit tests for Firebird metadata options; Added unit tests for Firebird metadata registries; Added unit tests for H2 JDBC URL parsing and instance judgment; Added unit tests for H2 dialect privilege checker and system database metadata; Added unit tests for Hive database metadata and identifier case policy; Added unit tests for Hive database type implementation; Added unit tests for JDBC URL parsing in Firebird, PostgreSQL, SQL92, and SQLServer connectors; Added unit tests for MethodTimeRecorder; Added unit tests for MySQL JDBC URL parsing and default query properties; Added unit tests for MySQL metadata loading; Added unit tests for MySQL, OpenGauss, and PostgreSQL ResultSet mappers; Added unit tests for OpenGauss database metadata configuration; Added unit tests for OpenGauss database privilege checking; Added unit tests for OpenTelemetry agent tracing advice; Added unit tests for OpenTelemetry tracing plugin lifecycle; Added unit tests for Oracle ResultSetMapper; Added unit tests for Oracle database metadata capabilities; Added unit tests for PR review inventory, scope resolution, and ledger management scripts; Added unit tests for PluginConfigurationLoader; Added unit tests for PluginContext; Added unit tests for PluginJarLoader; Added unit tests for PluginLifecycleServiceManager; Added unit tests for PluginPreconditions; Added unit tests for PostgreSQL metadata option helpers; Added unit tests for Prometheus metric collectors; Added unit tests for PrometheusMetricsExporter; Added unit tests for SQL Server database metadata; Added unit tests for SQL Server metadata loading; Added unit tests for SQL92 database metadata and function options; Added unit tests for SQLServerFunctionOption; Added unit tests for ShardingSphereDataSourceAdvice; Added unit tests for YAML advisor configuration loading; Added unit tests for YAML advisor configuration swappers; Added unit tests for YamlPluginConfigurationLoader; Added unit tests for YamlPluginsConfigurationSwapper; Added unit tests for agent YAML configuration and preconditions; Added unit tests for agent advisor executor types; Added unit tests for agent metrics core advice and exporters; Added unit tests for database connector core components; Added unit tests for database connector dialect implementations; Added unit tests for plugin configuration validation; Added unit tests for the MCP Mask feature module; Added unit tests for tracing core advice components; E2E test environment container framework refactored; New Agent E2E test engine infrastructure; New XML-driven SQL E2E test framework with data set management; New end-to-end driver test infrastructure and regression tests; New external SQL parser integration test framework; New integration test framework for SQL rewriter engine; New test framework extensions and matchers.
Dependencies
1795 commits updating dependencies (446 manifests)
A dependency / build maintenance change in (dependencies) — 1795 commits (138 fixs), 446 files.
(dependencies) · high confidence · unverified
Upgrade Maven Wrapper to version 3.3.4
The Maven Wrapper configuration has been updated to use wrapper version 3.3.4, which downloads Apache Maven 3.9.14. This ensures that builds use a consistent, modern version of Maven across all environments, eliminating potential discrepancies caused by locally installed Maven versions.
.mvn/wrapper · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 66 → 65 (-0.9)
Lenses
- Code Health 71 → 71 (-0.1)
- Architecture 62 → 62 (+0.0)
- Maturity 74 → 69 (-5.3)
- Readiness 63 → 63 (+0.1)
- Security 77 → 69 (-7.5)
- Performance 79 → 79 (+0.0)
Resolved (607)
- AbstractRecordTableInventoryCalculator.setParameters (cognitive 16) (kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/dumper/inventory/query/calculator/AbstractRecordTableInventoryCalculator.java)
- Change coupling clique: EncryptRuleConfigurationToDistSQLConverter.java, MaskRuleConfigurationToDistSQLConverter.java, ReadwriteSplittingRuleConfigurationToDistSQLConverter.java, ShadowRuleConfigurationToDistSQLConverter.java, ShardingRuleConfigurationToDistSQLConverter.java (features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/converter/EncryptRuleConfigurationToDistSQLConverter.java)
- Change coupling: AlterSchemaPushDownMetaDataRefresher.java ↔ CreateTablePushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/schema/AlterSchemaPushDownMetaDataRefresher.java)
- Change coupling: ClusterMetaDataManagerPersistService.java ↔ StandalonePersistServiceFacade.java (mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/ClusterMetaDataManagerPersistService.java)
- Change coupling: DatabaseMetaDataPersistFacade.java ↔ ClusterMetaDataManagerPersistService.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/metadata/DatabaseMetaDataPersistFacade.java)
- Change coupling: FirebirdDatabaseMetaData.java ↔ MySQLDatabaseMetaData.java (database/connector/dialect/firebird/src/main/java/org/apache/shardingsphere/database/connector/firebird/metadata/database/FirebirdDatabaseMetaData.java)
- Change coupling: FirebirdDatabaseMetaData.java ↔ OpenGaussDatabaseMetaData.java (database/connector/dialect/firebird/src/main/java/org/apache/shardingsphere/database/connector/firebird/metadata/database/FirebirdDatabaseMetaData.java)
- Change coupling: OpenGaussDatabaseMetaData.java ↔ OracleDatabaseMetaData.java (database/connector/dialect/opengauss/src/main/java/org/apache/shardingsphere/database/connector/opengauss/metadata/database/OpenGaussDatabaseMetaData.java)
- Change-coupling hub: AlterTablePushDownMetaDataRefresher.java → CreateViewFederationMetaDataRefresher.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, CreateTablePushDownMetaDataRefresher.java, RenameTablePushDownMetaDataRefresher.java, AlterViewPushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/AlterTablePushDownMetaDataRefresher.java)
- Change-coupling hub: AlterViewPushDownMetaDataRefresher.java → CreateViewFederationMetaDataRefresher.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, CreateTablePushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/AlterViewPushDownMetaDataRefresher.java)
- Change-coupling hub: CreateViewPushDownMetaDataRefresher.java → CreateViewFederationMetaDataRefresher.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, AlterSchemaPushDownMetaDataRefresher.java, AlterTablePushDownMetaDataRefresher.java, CreateTablePushDownMetaDataRefresher.java, RenameTablePushDownMetaDataRefresher.java, AlterViewPushDownMetaDataRefresher.java, DropViewPushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/CreateViewPushDownMetaDataRefresher.java)
- Change-coupling hub: DropViewPushDownMetaDataRefresher.java → PushDownMetaDataRefreshEngine.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, AlterSchemaPushDownMetaDataRefresher.java, AlterTablePushDownMetaDataRefresher.java, DropTablePushDownMetaDataRefresher.java, RenameTablePushDownMetaDataRefresher.java, AlterViewPushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/DropViewPushDownMetaDataRefresher.java)
- Change-coupling hub: PostgreSQLDatabaseMetaData.java → FirebirdDatabaseMetaData.java, MySQLDatabaseMetaData.java, OpenGaussDatabaseMetaData.java, OracleDatabaseMetaData.java (database/connector/dialect/postgresql/src/main/java/org/apache/shardingsphere/database/connector/postgresql/metadata/database/PostgreSQLDatabaseMetaData.java)
- Change-coupling hub: RenameTablePushDownMetaDataRefresher.java → CreateViewFederationMetaDataRefresher.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, CreateTablePushDownMetaDataRefresher.java, AlterViewPushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/RenameTablePushDownMetaDataRefresher.java)
- Dependency hygiene PARTLY measured — Maven build resolved part of the dependency graph, currency reported but not scored
- Documentation: hard to navigate (docs/blog/layouts/index.html)
- Documentation: hard to navigate (docs/document/archetypes/default.md)
- Duplicated block (10 lines × 2) (jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java)
- Duplicated block (10 lines × 2) (parser/sql/engine/dialect/opengauss/src/main/java/org/apache/shardingsphere/sql/parser/engine/opengauss/visitor/statement/OpenGaussStatementVisitor.java)
- Duplicated block (10 lines × 2) (parser/sql/engine/dialect/opengauss/src/main/java/org/apache/shardingsphere/sql/parser/engine/opengauss/visitor/statement/type/OpenGaussDCLStatementVisitor.java)
- …and 587 more
New (340)
- Change coupling clique: EncryptRuleConfigurationToDistSQLConverter.java, ShadowRuleConfigurationToDistSQLConverter.java, ShardingRuleConfigurationToDistSQLConverter.java (features/encrypt/distsql/handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/converter/EncryptRuleConfigurationToDistSQLConverter.java)
- Change coupling: EspressoInlineExpressionParser.java ↔ GroovyInlineExpressionParser.java (infra/expr/type/espresso/src/main/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParser.java)
- Change coupling: FirebirdDMLStatementVisitor.java ↔ SQLServerStatementVisitor.java (parser/sql/engine/dialect/firebird/src/main/java/org/apache/shardingsphere/sql/parser/engine/firebird/visitor/statement/type/FirebirdDMLStatementVisitor.java)
- Change coupling: MySQLBinlogEventPacketDecoder.java ↔ MySQLIncrementalDumper.java (kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/incremental/client/netty/MySQLBinlogEventPacketDecoder.java)
- Change coupling: MySQLDatabaseMetaData.java ↔ PostgreSQLDatabaseMetaData.java (database/connector/dialect/mysql/src/main/java/org/apache/shardingsphere/database/connector/mysql/metadata/database/MySQLDatabaseMetaData.java)
- Change coupling: OracleDatabaseMetaData.java ↔ PostgreSQLDatabaseMetaData.java (database/connector/dialect/oracle/src/main/java/org/apache/shardingsphere/database/connector/oracle/metadata/database/OracleDatabaseMetaData.java)
- Change-coupling hub: AlterTablePushDownMetaDataRefresher.java → CreateViewFederationMetaDataRefresher.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, CreateTablePushDownMetaDataRefresher.java, RenameTablePushDownMetaDataRefresher.java, AlterViewPushDownMetaDataRefresher.java, CreateViewPushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/AlterTablePushDownMetaDataRefresher.java)
- Change-coupling hub: AlterViewPushDownMetaDataRefresher.java → CreateViewFederationMetaDataRefresher.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, CreateTablePushDownMetaDataRefresher.java, CreateViewPushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/AlterViewPushDownMetaDataRefresher.java)
- Change-coupling hub: ClusterMetaDataManagerPersistService.java → DatabaseMetaDataPersistFacade.java, StandalonePersistServiceFacade.java, StandaloneMetaDataManagerPersistService.java (mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/ClusterMetaDataManagerPersistService.java)
- Change-coupling hub: CreateViewPushDownMetaDataRefresher.java → CreateViewFederationMetaDataRefresher.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, CreateTablePushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/CreateViewPushDownMetaDataRefresher.java)
- Change-coupling hub: DropViewPushDownMetaDataRefresher.java → AlterViewFederationMetaDataRefresher.java, CreateViewFederationMetaDataRefresher.java, PushDownMetaDataRefreshEngine.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, AlterSchemaPushDownMetaDataRefresher.java, AlterTablePushDownMetaDataRefresher.java, DropTablePushDownMetaDataRefresher.java, RenameTablePushDownMetaDataRefresher.java, AlterViewPushDownMetaDataRefresher.java, CreateViewPushDownMetaDataRefresher.java, StandaloneMetaDataManagerPersistService.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/view/DropViewPushDownMetaDataRefresher.java)
- Change-coupling hub: FirebirdDatabaseMetaData.java → MySQLDatabaseMetaData.java, OpenGaussDatabaseMetaData.java, OracleDatabaseMetaData.java, PostgreSQLDatabaseMetaData.java (database/connector/dialect/firebird/src/main/java/org/apache/shardingsphere/database/connector/firebird/metadata/database/FirebirdDatabaseMetaData.java)
- Change-coupling hub: OpenGaussDatabaseMetaData.java → MySQLDatabaseMetaData.java, OracleDatabaseMetaData.java, PostgreSQLDatabaseMetaData.java (database/connector/dialect/opengauss/src/main/java/org/apache/shardingsphere/database/connector/opengauss/metadata/database/OpenGaussDatabaseMetaData.java)
- Change-coupling hub: RenameTablePushDownMetaDataRefresher.java → CreateViewFederationMetaDataRefresher.java, AlterIndexPushDownMetaDataRefresher.java, CreateIndexPushDownMetaDataRefresher.java, DropIndexPushDownMetaDataRefresher.java, CreateTablePushDownMetaDataRefresher.java, AlterViewPushDownMetaDataRefresher.java, CreateViewPushDownMetaDataRefresher.java (mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/pushdown/type/table/RenameTablePushDownMetaDataRefresher.java)
- ColumnExtractor.extract (cognitive 16) (parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/extractor/ColumnExtractor.java)
- ColumnExtractor.extract (cyclomatic 17) (parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/extractor/ColumnExtractor.java)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Duplicated block (10 lines × 3) (mcp/features/shadow/src/main/java/org/apache/shardingsphere/mcp/feature/shadow/tool/model/ShadowAlgorithmCleanupWorkflowRequest.java)
- Duplicated block (10 lines × 3) (parser/sql/engine/dialect/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/engine/clickhouse/visitor/statement/type/ClickHouseDMLStatementVisitor.java)
- Duplicated block (10 lines × 4) (parser/sql/engine/dialect/clickhouse/src/main/java/org/apache/shardingsphere/sql/parser/engine/clickhouse/visitor/statement/type/ClickHouseDMLStatementVisitor.java)
- …and 320 more
Changes since last survey
- 158 commits — 109 feature/other, 49 fixes
By area
- .codex/skills — 22 commits
- .github/workflows — 22 commits
- test/it — 16 commits
- proxy/frontend — 13 commits
- database/protocol — 10 commits
- database/connector — 7 commits
- .codex/harness — 6 commits
- infra/binder — 6 commits
- parser/sql — 6 commits
- test/e2e — 6 commits
- (root) — 4 commits
- features/sharding — 4 commits
- kernel/data-pipeline — 4 commits
- docs/community — 3 commits
- infra/common — 3 commits
- proxy/backend — 3 commits
- (repo) — 2 commits
- .codex/context — 2 commits
- docs/document — 2 commits
- infra/data-source-pool — 2 commits
Notable commits
- fix: Fix #39084: Detect and warn about missing tables during metadata loading (#39540)
- fix: Fix Firebird BLOB segment test compilation (#40156)
- fix: Fix Firebird OFFSET/FETCH rewrite by visiting limitClause (#39955)
- fix: Fix Firebird TIMESTAMP_TZ offset decoding and encoding (#40338)
- fix: Fix Firebird keyword column aliases (#40283)
- fix: Fix FirebirdExecuteStatementPacketTest (#40350)
- fix: Fix Hive parser SPI loading without Hive JDBC driver (#40162)
- fix: Fix JDBC database null handling and preserve original exceptions (#40239)
- fix: Fix MCP LLM preview result assertions (#40161)
- fix: Fix MCP coverage gate input and close approved coverage gaps (#40282)
- fix: Fix MCP documentation link-check false positives (#40149)
- fix: Fix MCP package links in release documentation (#40147)
- fix: Fix MySQL OR and XOR operator precedence (#40329)
- fix: Fix MySQL STRING parameter decoding for numeric columns (#40232)
- fix: Fix PostgreSQL DML source and target visitors (#40204)
- fix: Fix PostgreSQL external corpus loading for inactive psql branches (#40231)
- fix: Fix PostgreSQL external parser input boundaries (#40202)
- fix: Fix PostgreSQL external parser input loading (#40192)
- fix: Fix PostgreSQL statement descriptions with derived projections (#40201)
- fix: Fix Proxy startup failure when dataSourceClassName is HikariDataSource (#40324)
- …and 138 more
Architecture
- Containers 0 added · 0 removed · contexts 4 added · 4 removed · edges 22 added · 22 removed
Added bounded contexts (4)
- shardingsphere-database-protocol-firebird
- shardingsphere-database-protocol-mysql
- shardingsphere-database-protocol-opengauss
- shardingsphere-database-protocol-postgresql
Removed bounded contexts (4)
- shardingsphere-protocol-firebird
- shardingsphere-protocol-mysql
- shardingsphere-protocol-opengauss
- shardingsphere-protocol-postgresql
Added dependency edges (22)
- shardingsphere-data-pipeline-core → shardingsphere-database-connector-core (coupling)
- shardingsphere-data-pipeline-core → shardingsphere-mode-core (coupling)
- shardingsphere-data-pipeline-mysql → shardingsphere-database-protocol-mysql
- shardingsphere-data-pipeline-scenario-consistency-check → shardingsphere-data-pipeline-core (coupling)
- shardingsphere-database-protocol-firebird → shardingsphere-database-connector-core
- shardingsphere-database-protocol-firebird → shardingsphere-parser-sql-statement-core (coupling)
- shardingsphere-database-protocol-opengauss → shardingsphere-database-protocol-postgresql (coupling)
- shardingsphere-encrypt-core → shardingsphere-database-connector-core (coupling)
- shardingsphere-mcp-core → shardingsphere-database-connector-core (coupling)
- shardingsphere-mcp-support → shardingsphere-database-connector-core (coupling)
- shardingsphere-parser-sql-statement-core → shardingsphere-database-connector-core (coupling)
- shardingsphere-proxy-backend-core → shardingsphere-mode-core (coupling)
- shardingsphere-proxy-backend-core → shardingsphere-parser-sql-statement-core (coupling)
- shardingsphere-proxy-backend-opengauss → shardingsphere-database-protocol-postgresql
- shardingsphere-proxy-frontend-firebird → shardingsphere-database-protocol-firebird (coupling)
- shardingsphere-proxy-frontend-mysql → shardingsphere-database-protocol-mysql (coupling)
- shardingsphere-proxy-frontend-opengauss → shardingsphere-database-protocol-opengauss
- shardingsphere-proxy-frontend-opengauss → shardingsphere-database-protocol-postgresql
- shardingsphere-proxy-frontend-postgresql → shardingsphere-database-protocol-postgresql (coupling)
- shardingsphere-sharding-core → shardingsphere-database-connector-core (coupling)
- …and 2 more
Removed dependency edges (was a dependency, now gone) (22)
- shardingsphere-data-pipeline-core → shardingsphere-database-connector-core
- shardingsphere-data-pipeline-core → shardingsphere-mode-core
- shardingsphere-data-pipeline-mysql → shardingsphere-protocol-mysql
- shardingsphere-data-pipeline-scenario-consistency-check → shardingsphere-data-pipeline-core
- shardingsphere-encrypt-core → shardingsphere-database-connector-core
- shardingsphere-mcp-core → shardingsphere-database-connector-core
- shardingsphere-mcp-support → shardingsphere-database-connector-core
- shardingsphere-parser-sql-statement-core → shardingsphere-database-connector-core
- shardingsphere-protocol-firebird → shardingsphere-database-connector-core
- shardingsphere-protocol-firebird → shardingsphere-parser-sql-statement-core
- shardingsphere-protocol-opengauss → shardingsphere-protocol-postgresql
- shardingsphere-proxy-backend-core → shardingsphere-mode-core
- shardingsphere-proxy-backend-core → shardingsphere-parser-sql-statement-core
- shardingsphere-proxy-backend-opengauss → shardingsphere-protocol-postgresql
- shardingsphere-proxy-frontend-firebird → shardingsphere-protocol-firebird
- shardingsphere-proxy-frontend-mysql → shardingsphere-protocol-mysql
- shardingsphere-proxy-frontend-opengauss → shardingsphere-protocol-opengauss
- shardingsphere-proxy-frontend-opengauss → shardingsphere-protocol-postgresql
- shardingsphere-proxy-frontend-postgresql → shardingsphere-protocol-postgresql
- shardingsphere-sharding-core → shardingsphere-database-connector-core
- …and 2 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
apache/shardingsphere was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 24 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f4acdb6e44b3d93e52146f8b1e9c94a6f7825b71 — the exact code this score is about.
- Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer measure-2026.10.6+preprod-d36780c2d857.