jingshanglu opened a new issue, #18370:
URL: https://github.com/apache/shardingsphere/issues/18370
### Which version of ShardingSphere did you use?
master
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
```
ALTER READWRITE_SPLITTING RULE readwrite_ds
(WRITE_RESOURCE=write_ds,READ_RESOURCES(read_ds_0,read_ds_1),TYPE(NAME=FIXED_PRIMARY));
begin;
```
no error.
### Actual behavior
ERROR: java.lang.NullPointerException
### Reason analyze (If you can)
after run `distsql`
org.apache.shardingsphere.transaction.rule.TransactionRule#resources is null.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
server.yaml
```
mode:
type: Standalone
repository:
type: File
props:
path: ./metafile
overwrite: false
rules:
- !AUTHORITY
users:
- root@%:root
- sharding@:sharding
provider:
type: ALL_PERMITTED
```
config-readwrite-splitting.yaml
```
databaseName: readwrite_splitting_db
dataSources:
write_ds:
url:
jdbc:opengauss://127.0.0.1:15432/test?serverTimezone=UTC&useSSL=false
username: gaussdb
password: Enmo@123
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
read_ds_0:
url:
jdbc:opengauss://127.0.0.1:15433/test?serverTimezone=UTC&useSSL=false
username: gaussdb
password: Enmo@123
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
read_ds_1:
url:
jdbc:opengauss://127.0.0.1:15433/test?serverTimezone=UTC&useSSL=false
username: gaussdb
password: Enmo@123
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !READWRITE_SPLITTING
dataSources:
readwrite_ds:
type: Static
props:
write-data-source-name: write_ds
read-data-source-names: read_ds_0,read_ds_1
loadBalancerName: random
loadBalancers:
random:
type: FIXED_PRIMARY
```
### Example codes for reproduce this issue (such as a github link).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]