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/16 01:05:07 UTC

[GitHub] [shardingsphere] natehuangting opened a new issue, #18380: DatabaseDiscovery keeps at least some replicas

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

   ## Feature Request
   
   ### Describe the feature you would like.
   If all replicas are disabled, using RandomReplicaLoadBalanceAlgorithm will throw an exception. I want to define a parameter 'min-enabled-replicas-threshold' in props of discoveryTypes, which means that at least a few replicas cannot be disabled. And the specific processing logic will be placed in the method 'updateStatus' of the class DatabaseDiscoveryRule.
   


-- 
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 #18380: DatabaseDiscovery keeps at least some replicas

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

   Maybe it's better to change `min-enabled-replicas-threshold` to `min-enabled-replicas`.


-- 
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 #18380: DatabaseDiscovery keeps at least some replicas

Posted by GitBox <gi...@apache.org>.
zjcnb closed issue #18380: DatabaseDiscovery keeps at least some replicas
URL: https://github.com/apache/shardingsphere/issues/18380


-- 
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 commented on issue #18380: DatabaseDiscovery keeps at least some replicas

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

   @natehuangting Hi, i think it 's good idea. And can you attach the configuration for db-discovery?


-- 
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] natehuangting commented on issue #18380: DatabaseDiscovery keeps at least some replicas

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

   The configuration for db-discovery.
   ```
   rules:
     - !READWRITE_SPLITTING
       dataSources:
         readwrite_ds:
           type: Dynamic
           props:
             auto-aware-data-source-name: readwrite_ds
   
     - !DB_DISCOVERY
       dataSources:
         readwrite_ds:
           dataSourceNames:
             - ds_0
             - ds_1
             - ds_2
           discoveryTypeName: mysql_normal
           discoveryHeartbeatName: mysql-heartbeat
       discoveryHeartbeats:
         mysql-heartbeat:
           props:
             keep-alive-cron: '0/5 * * * * ?'
       discoveryTypes:
         mysql_normal:
           type: MySQL.NORMAL_REPLICATION
           props:
             delay-milliseconds-threshold: 10000
             min-enabled-replicas-threshold: 1
   ```
   
   


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