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/25 11:48:05 UTC

[GitHub] [shardingsphere] zjcnb opened a new issue, #18587: Consider refactor `readwrite-splitting` Configuration.

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

   Hi community,
   
   Now,  the `readwrite-splitting` configuration are not user-friendly. The master-slave configuration should be intuitive to the user. Instead of the master-slave configuration to props. So we should be refactor it.
   
   `Static Readwrite-splitting before refactor : `
   
   ```
   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: RANDOM
   ```
   
   `Dynamic Readwrite-splitting before refactor : `
   
   ```
   rules:
   - !READWRITE_SPLITTING
     dataSources:
       replication_ds:
         type: Dynamic
         props:
           auto-aware-data-source-name: readwrite_ds
           write-data-source-query-enabled: false
   - !DB_DISCOVERY
     dataSources:
       readwrite_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: MGR
         props:
           group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
   ```
   
   `Static Readwrite-splitting after refactor : `
   
   ```
    rules:
   - !READWRITE_SPLITTING
     dataSources:
       readwrite_ds:
         dataSourceStrategy:
           static:
             writeDataSourceName: write_ds
             readDataSourceNames:
               - read_ds_0
               - read_ds_1
   ```
   
   `Dynamic Readwrite-splitting before refactor : `
   
   ```
   rules:
   - !READWRITE_SPLITTING
     dataSources:
       readwrite_ds:
         dataSourceStrategy:
           dynamic:
             autoAwareDataSourceName: readwrite_ds
             writeDataSourceQueryEnabled: false
   - !DB_DISCOVERY
     dataSources:
       readwrite_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: MGR
         props:
           group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
   ```


-- 
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 commented on issue #18587: Consider refactor `readwrite-splitting` Configuration

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18587:
URL: https://github.com/apache/shardingsphere/issues/18587#issuecomment-1182871487

   The feature are completed, close it.


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


[GitHub] [shardingsphere] zhaojinchao95 commented on issue #18587: Consider refactor `readwrite-splitting` Configuration

Posted by "zhaojinchao95 (via GitHub)" <gi...@apache.org>.
zhaojinchao95 commented on issue #18587:
URL: https://github.com/apache/shardingsphere/issues/18587#issuecomment-1442803123

   I think ShardingSphere 's readwrite-splitting shouldn't support all read datasources are shutdown, the write data source support read service when use `discovery` & `readwrite-splitting `. Because, `readwrite-splitting` should be kept simple, this should be guaranteed by the high availability of the database. So, i will remove `write_data_source_query_enable` configuration.
   


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


[GitHub] [shardingsphere] zjcnb closed issue #18587: Consider refactor `readwrite-splitting` Configuration

Posted by GitBox <gi...@apache.org>.
zjcnb closed issue #18587: Consider refactor `readwrite-splitting` Configuration
URL: https://github.com/apache/shardingsphere/issues/18587


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