You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/06/13 11:40:43 UTC

[GitHub] [shardingsphere] zjcnb opened a new issue, #18336: No sync between `ShardingSphere` cluster when ADD RESOURCE resource_0 first time

zjcnb opened a new issue, #18336:
URL: https://github.com/apache/shardingsphere/issues/18336

   ### Which version of ShardingSphere did you use?
   
   `master`
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   `Proxy-1` `server.yaml : `
   
   ```
   mode:
     type: Cluster
     repository:
       type: ZooKeeper
       props:
         namespace: governance_ds
         server-lists: localhost:2181
         retryIntervalMilliseconds: 500
         timeToLiveSeconds: 60
         maxRetries: 3
         operationTimeoutMilliseconds: 500
     overwrite: false
   
   rules:
     - !AUTHORITY
       users:
         - root@%:root
         - sharding@:sharding
       provider:
         type: ALL_PERMITTED
   ```
   
   `Proxy-2` `server.yaml : `
   
   mode:
     type: Cluster
     repository:
       type: ZooKeeper
       props:
         namespace: governance_ds
         server-lists: localhost:2181
         retryIntervalMilliseconds: 500
         timeToLiveSeconds: 60
         maxRetries: 3
         operationTimeoutMilliseconds: 500
     overwrite: false
   
   rules:
     - !AUTHORITY
       users:
         - root@%:root
         - sharding@:sharding
       provider:
         type: ALL_PERMITTED
   
   `Proxy-1 and Proxy-2` start up.
   
   Execute SQL in `Proxy-1` :
   
   ```
   
   mysql> show databases;
   +--------------------+
   | schema_name        |
   +--------------------+
   | mysql              |
   | information_schema |
   | performance_schema |
   | sys                |
   +--------------------+
   4 rows in set (0.03 sec)
   
   mysql> create database test;
   Query OK, 0 rows affected (0.14 sec)
   
   mysql> use test;
   Database changed
   mysql> ADD RESOURCE resource_0 (
       ->     HOST=127.0.0.1,
       ->     PORT=3306,
       ->     DB=ds0,
       ->     USER=root,
       ->     PASSWORD=123456
       -> );
   Query OK, 0 rows affected (2.95 sec)
   
   mysql> show database resources \G;
   *************************** 1. row ***************************
                              name: resource_0
                              type: MySQL
                              host: 127.0.0.1
                              port: 3306
                                db: ds0
   connection_timeout_milliseconds: 30000
         idle_timeout_milliseconds: 60000
         max_lifetime_milliseconds: 2100000
                     max_pool_size: 50
                     min_pool_size: 1
                         read_only: false
                  other_attributes: {"dataSourceProperties":{"cacheServerConfiguration":"true","elideSetAutoCommits":"true","useServerPrepStmts":"true","cachePrepStmts":"true","useSSL":"false","rewriteBatchedStatements":"true","cacheResultSetMetadata":"false","useLocalSessionState":"true","maintainTimeStats":"false","prepStmtCacheSize":"200000","tinyInt1isBit":"false","prepStmtCacheSqlLimit":"2048","serverTimezone":"UTC","netTimeoutForStreamingResults":"0","zeroDateTimeBehavior":"round"},"healthCheckProperties":{},"initializationFailTimeout":1,"validationTimeout":5000,"leakDetectionThreshold":0,"poolName":"HikariPool-2","registerMbeans":false,"allowPoolSuspension":false,"autoCommit":true,"isolateInternalQueries":false}
   1 row in set (0.16 sec) 
   ```
   
   Execute SQL in `Proxy-2` :
   
   ```
   mysql> show databases;
   +--------------------+
   | schema_name        |
   +--------------------+
   | mysql              |
   | information_schema |
   | performance_schema |
   | sys                |
   +--------------------+
   4 rows in set (0.01 sec)
   
   mysql> show databases;
   +--------------------+
   | schema_name        |
   +--------------------+
   | mysql              |
   | information_schema |
   | performance_schema |
   | sys                |
   | test               |
   +--------------------+
   5 rows in set (0.00 sec)
   
   mysql> show database resources \G;
   ERROR 1046 (3D000): No database selected
   ERROR:
   No query specified
   
   mysql> use test;
   Database changed
   mysql> show database resources \G;
   Empty set (0.01 sec)
   ```
   
   <img width="1231" alt="image" src="https://user-images.githubusercontent.com/33742097/173345668-d6d36106-7d06-4527-84ec-eb197a28f16a.png">
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zjcnb closed issue #18336: No sync between `ShardingSphere` cluster when ADD RESOURCE resource_0 first time

Posted by GitBox <gi...@apache.org>.
zjcnb closed issue #18336: No sync between `ShardingSphere` cluster when ADD RESOURCE resource_0 first time
URL: https://github.com/apache/shardingsphere/issues/18336


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org