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

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   master 
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### Expected behavior
   <img width="1387" alt="image" 
src="https://user-images.githubusercontent.com/86462784/177316136-75127397-7fd7-4818-a493-a78eeb704cdb.png";>
   
   ### Actual behavior
   <img width="1227" alt="image" 
src="https://user-images.githubusercontent.com/86462784/177316107-88f3bf61-b711-46b8-ac23-fae53148f70d.png";>
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   1. buidl MySQL MGR
   2. BUild Proxy cluster
   3. start scaling job
   4. shutdown slave node of MGR
   5. shutdown master node of MGR
   
   ### Example codes for reproduce this issue (such as a github link).
   server.yaml
   ```
   mode:
     type: Cluster
     repository:
       type: ZooKeeper
       props:
         namespace: 0705_dynamic
         server-lists: ip:2181
         retryIntervalMilliseconds: 500
         timeToLiveSeconds: 60
         maxRetries: 3
         operationTimeoutMilliseconds: 500
     overwrite: false
   
   rules:
     - !AUTHORITY
       users:
         - user: root@%
           password: root
         - user: sharding
           password: sharding
       privilege:
         type: ALL_PERMITTED
   ```
   config-sharding.yaml
   ```
   databaseName: sharding_db
   
   dataSources:
     ds_0:
       url: jdbc:mysql://ip:33306/scaling_ds_0?serverTimezone=UTC&useSSL=false
       username: root
       password: 123
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_1:
       url: jdbc:mysql://ip:33307/scaling_ds_0?serverTimezone=UTC&useSSL=false
       username: root
       password: 123
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_2:
       url: jdbc:mysql://ip:33308/scaling_ds_0?serverTimezone=UTC&useSSL=false
       username: root
       password: 123
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
     - !SHARDING
       autoTables:
         t_order:
           actualDataSources: readwrite
           keyGenerateStrategy:
             column: order_id
             keyGeneratorName: t_order_snowflake
           logicTable: t_order
           shardingStrategy:
             standard:
               shardingAlgorithmName: t_order_hash_mod
               shardingColumn: order_id
       shardingAlgorithms:
         t_order_inline:
           props:
             algorithm-expression: t_order_${order_id % 2}
           type: INLINE
         t_order_hash_mod:
           props:
             sharding-count: '2'
           type: hash_mod
       keyGenerators:
         snowflake:
           type: SNOWFLAKE
   
       scalingName: default_scaling
       scaling:
         default_scaling:
           input:
             workerThread: 40
             batchSize: 1000
           output:
             workerThread: 40
             batchSize: 1000
           streamChannel:
             type: MEMORY
             props:
               block-queue-size: 10000
           dataConsistencyChecker:
             type: DATA_MATCH
             props:
               chunk-size: 1000
   
     - !READWRITE_SPLITTING
       dataSources:
         readwrite:
           type: Dynamic
           props:
             auto-aware-data-source-name: replica_ds
   
     - !DB_DISCOVERY
       dataSources:
         replica_ds:
           dataSourceNames:
             - ds_0
             - ds_1
             - ds_2
           discoveryHeartbeatName: mgr-heartbeat
           discoveryTypeName: mgr
       discoveryHeartbeats:
         mgr-heartbeat:
           props:
             keep-alive-cron: '0/5 * * * * ?'
       discoveryTypes:
         mgr:
           type: MySQL.MGR
           props:
             group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
   ```
   
   sql
   ```
   CREATE TABLE t_order (order_id bigint NOT NULL, user_id int DEFAULT NULL, 
status varchar(50) DEFAULT NULL, t_numeric numeric(10,2) DEFAULT NULL, PRIMARY 
KEY (order_id));
   ALTER SHARDING TABLE RULE 
t_order(RESOURCES(readwrite),SHARDING_COLUMN=order_id,TYPE(NAME=hash_mod,PROPERTIES('sharding-count'=6)),KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake)));
   SHOW SCALING STALE SHARDING TABLE 
0130317c30317c3054317c7368617264696e675f6462;
   ```
   


-- 
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]

Reply via email to