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 2020/06/02 05:42:08 UTC

[GitHub] [shardingsphere] menghaoranss opened a new pull request #5883: Optimize disable proxy instance with UI # control-panel-cluster

menghaoranss opened a new pull request #5883:
URL: https://github.com/apache/shardingsphere/pull/5883


   For #5666.
   
   Changes proposed in this pull request:
   - optimize disable proxy instance code
   - fix errors of loading master_slave datasources in UI
   


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

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



[GitHub] [shardingsphere] menghaoranss commented on a change in pull request #5883: Optimize disable proxy instance with UI # control-panel-cluster

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on a change in pull request #5883:
URL: https://github.com/apache/shardingsphere/pull/5883#discussion_r433787810



##########
File path: shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/listener/InstanceStateChangedListener.java
##########
@@ -38,6 +41,14 @@ public InstanceStateChangedListener(final String name, final RegistryCenterRepos
     
     @Override
     protected CircuitStateChangedEvent createShardingOrchestrationEvent(final DataChangedEvent event) {
-        return new CircuitStateChangedEvent(RegistryCenterNodeStatus.DISABLED.toString().equalsIgnoreCase(event.getValue()));
+        return new CircuitStateChangedEvent(isCircuitBreak(event.getValue()));
+    }
+    
+    private Boolean isCircuitBreak(final String value) {

Review comment:
       Fixed.




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

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



[GitHub] [shardingsphere] kimmking merged pull request #5883: Optimize disable proxy instance with UI # control-panel-cluster

Posted by GitBox <gi...@apache.org>.
kimmking merged pull request #5883:
URL: https://github.com/apache/shardingsphere/pull/5883


   


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

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



[GitHub] [shardingsphere] codecov-commenter edited a comment on pull request #5883: Optimize disable proxy instance with UI # control-panel-cluster

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5883:
URL: https://github.com/apache/shardingsphere/pull/5883#issuecomment-637300226


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=h1) Report
   > Merging [#5883](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere/commit/49ab3972cd5c6ba61d7b94ebecfdb30a94cd8bf4&el=desc) will **increase** coverage by `0.00%`.
   > The diff coverage is `83.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/5883/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #5883   +/-   ##
   =========================================
     Coverage     53.02%   53.03%           
     Complexity      439      439           
   =========================================
     Files          1181     1182    +1     
     Lines         20756    20761    +5     
     Branches       3735     3736    +1     
   =========================================
   + Hits          11006    11010    +4     
   - Misses         9072     9073    +1     
     Partials        678      678           
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [.../core/registrycenter/instance/DataSourceState.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtY29udHJvbC1wYW5lbC9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uL3NoYXJkaW5nc3BoZXJlLW9yY2hlc3RyYXRpb24tY29yZS9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uLWNvcmUtcmVnaXN0cnljZW50ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL29yY2hlc3RyYXRpb24vY29yZS9yZWdpc3RyeWNlbnRlci9pbnN0YW5jZS9EYXRhU291cmNlU3RhdGUuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
   | [...ycenter/listener/InstanceStateChangedListener.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtY29udHJvbC1wYW5lbC9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uL3NoYXJkaW5nc3BoZXJlLW9yY2hlc3RyYXRpb24tY29yZS9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uLWNvcmUtcmVnaXN0cnljZW50ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL29yY2hlc3RyYXRpb24vY29yZS9yZWdpc3RyeWNlbnRlci9saXN0ZW5lci9JbnN0YW5jZVN0YXRlQ2hhbmdlZExpc3RlbmVyLmphdmE=) | `87.50% <100.00%> (+12.50%)` | `0.00 <0.00> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=footer). Last update [49ab397...d166f9e](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



[GitHub] [shardingsphere] kimmking commented on a change in pull request #5883: Optimize disable proxy instance with UI # control-panel-cluster

Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #5883:
URL: https://github.com/apache/shardingsphere/pull/5883#discussion_r433772569



##########
File path: shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/listener/InstanceStateChangedListener.java
##########
@@ -38,6 +41,14 @@ public InstanceStateChangedListener(final String name, final RegistryCenterRepos
     
     @Override
     protected CircuitStateChangedEvent createShardingOrchestrationEvent(final DataChangedEvent event) {
-        return new CircuitStateChangedEvent(RegistryCenterNodeStatus.DISABLED.toString().equalsIgnoreCase(event.getValue()));
+        return new CircuitStateChangedEvent(isCircuitBreak(event.getValue()));
+    }
+    
+    private Boolean isCircuitBreak(final String value) {

Review comment:
       use boolean




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

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



[GitHub] [shardingsphere] codecov-commenter commented on pull request #5883: Optimize disable proxy instance with UI # control-panel-cluster

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #5883:
URL: https://github.com/apache/shardingsphere/pull/5883#issuecomment-637300226


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=h1) Report
   > Merging [#5883](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere/commit/6ea58fac4faaf6693e9278e6e9ce3b27bce3fd26&el=desc) will **increase** coverage by `0.21%`.
   > The diff coverage is `83.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/5883/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #5883      +/-   ##
   ============================================
   + Coverage     52.81%   53.03%   +0.21%     
   - Complexity      435      439       +4     
   ============================================
     Files          1181     1182       +1     
     Lines         20822    20761      -61     
     Branches       3741     3736       -5     
   ============================================
   + Hits          10997    11010      +13     
   + Misses         9149     9073      -76     
   - Partials        676      678       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [.../core/registrycenter/instance/DataSourceState.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtY29udHJvbC1wYW5lbC9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uL3NoYXJkaW5nc3BoZXJlLW9yY2hlc3RyYXRpb24tY29yZS9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uLWNvcmUtcmVnaXN0cnljZW50ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL29yY2hlc3RyYXRpb24vY29yZS9yZWdpc3RyeWNlbnRlci9pbnN0YW5jZS9EYXRhU291cmNlU3RhdGUuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
   | [...ycenter/listener/InstanceStateChangedListener.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtY29udHJvbC1wYW5lbC9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uL3NoYXJkaW5nc3BoZXJlLW9yY2hlc3RyYXRpb24tY29yZS9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uLWNvcmUtcmVnaXN0cnljZW50ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL29yY2hlc3RyYXRpb24vY29yZS9yZWdpc3RyeWNlbnRlci9saXN0ZW5lci9JbnN0YW5jZVN0YXRlQ2hhbmdlZExpc3RlbmVyLmphdmE=) | `87.50% <100.00%> (+12.50%)` | `0.00 <0.00> (ø)` | |
   | [...asource/OrchestrationShardingSphereDataSource.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtamRiYy9zaGFyZGluZ3NwaGVyZS1qZGJjLW9yY2hlc3RyYXRpb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RyaXZlci9vcmNoZXN0cmF0aW9uL2ludGVybmFsL2RhdGFzb3VyY2UvT3JjaGVzdHJhdGlvblNoYXJkaW5nU3BoZXJlRGF0YVNvdXJjZS5qYXZh) | `64.51% <0.00%> (-5.66%)` | `0.00% <0.00%> (ø%)` | |
   | [...ava/org/apache/shardingsphere/proxy/Bootstrap.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYm9vdHN0cmFwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9Cb290c3RyYXAuamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [.../shardingsphere/kernel/context/SchemaContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWtlcm5lbC1jb250ZXh0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9rZXJuZWwvY29udGV4dC9TY2hlbWFDb250ZXh0cy5qYXZh) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...gsphere/proxy/backend/cluster/HeartbeatDetect.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9jbHVzdGVyL0hlYXJ0YmVhdERldGVjdC5qYXZh) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...y/backend/control/ProxyControlPanelSubscriber.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9jb250cm9sL1Byb3h5Q29udHJvbFBhbmVsU3Vic2NyaWJlci5qYXZh) | | | |
   | [...ere/control/panel/core/ControlPanelSubscriber.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtY29udHJvbC1wYW5lbC9zaGFyZGluZ3NwaGVyZS1jb250cm9sLXBhbmVsLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2NvbnRyb2wvcGFuZWwvY29yZS9Db250cm9sUGFuZWxTdWJzY3JpYmVyLmphdmE=) | | | |
   | [...ckend/schema/ProxyOrchestrationSchemaContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9zY2hlbWEvUHJveHlPcmNoZXN0cmF0aW9uU2NoZW1hQ29udGV4dHMuamF2YQ==) | `10.00% <0.00%> (ø)` | `0.00% <0.00%> (?%)` | |
   | [...ation/core/schema/OrchestrationSchemaContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtY29udHJvbC1wYW5lbC9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uL3NoYXJkaW5nc3BoZXJlLW9yY2hlc3RyYXRpb24tY29yZS9zaGFyZGluZ3NwaGVyZS1vcmNoZXN0cmF0aW9uLWNvcmUtc2NoZW1hL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9vcmNoZXN0cmF0aW9uL2NvcmUvc2NoZW1hL09yY2hlc3RyYXRpb25TY2hlbWFDb250ZXh0cy5qYXZh) | `0.00% <0.00%> (ø)` | `0.00% <0.00%> (?%)` | |
   | ... and [6 more](https://codecov.io/gh/apache/shardingsphere/pull/5883/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=footer). Last update [6ea58fa...86d0ebf](https://codecov.io/gh/apache/shardingsphere/pull/5883?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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