You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/06/03 05:23:21 UTC

[GitHub] [dubbo-go] watermelo opened a new pull request #584: Feat: add comment for cluster

watermelo opened a new pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   add comment for cluster directory
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   
   ```


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #584: Ftr: add comment for cluster

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#issuecomment-637963062


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=h1) Report
   > Merging [#584](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **decrease** coverage by `0.26%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/584/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #584      +/-   ##
   ===========================================
   - Coverage    66.43%   66.16%   -0.27%     
   ===========================================
     Files          184      184              
     Lines         9712     9709       -3     
   ===========================================
   - Hits          6452     6424      -28     
   - Misses        2620     2642      +22     
   - Partials       640      643       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `73.33% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failback\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failover\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbG92ZXJfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failsafe\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbHNhZmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/forking\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZm9ya2luZ19jbHVzdGVyLmdv) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/registry\_aware\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvcmVnaXN0cnlfYXdhcmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | ... and [14 more](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?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/dubbo-go/pull/584?src=pr&el=footer). Last update [4af26b9...5ee57b1](https://codecov.io/gh/apache/dubbo-go/pull/584?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #584: Ftr: add comment for cluster

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#issuecomment-637963062


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=h1) Report
   > Merging [#584](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **increase** coverage by `0.37%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/584/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #584      +/-   ##
   ===========================================
   + Coverage    66.43%   66.81%   +0.37%     
   ===========================================
     Files          184      184              
     Lines         9712     9690      -22     
   ===========================================
   + Hits          6452     6474      +22     
   + Misses        2620     2576      -44     
     Partials       640      640              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `73.33% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failback\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failover\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbG92ZXJfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failsafe\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbHNhZmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/forking\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZm9ya2luZ19jbHVzdGVyLmdv) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/registry\_aware\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvcmVnaXN0cnlfYXdhcmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | ... and [16 more](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?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/dubbo-go/pull/584?src=pr&el=footer). Last update [4af26b9...0a06522](https://codecov.io/gh/apache/dubbo-go/pull/584?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] watermelo commented on pull request #584: Feat: add comment for cluster

Posted by GitBox <gi...@apache.org>.
watermelo commented on pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#issuecomment-637960995


   #564


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zouyx commented on a change in pull request #584: Ftr: add comment for cluster

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#discussion_r434702835



##########
File path: cluster/cluster_impl/broadcast_cluster.go
##########
@@ -31,7 +31,10 @@ func init() {
 	extension.SetCluster(broadcast, NewBroadcastCluster)
 }
 
-// NewBroadcastCluster ...
+// NewBroadcastCluster returns broadcast cluster instance
+//
+// Calling all providers broadcast, one by one call, any error is reported.

Review comment:
       what's the meaning of `providers'` ?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zouyx commented on a change in pull request #584: Feat: add comment for cluster

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#discussion_r434323352



##########
File path: cluster/loadbalance/least_active.go
##########
@@ -28,7 +28,6 @@ import (
 )
 
 const (
-	// LeastActive ...
 	LeastActive = "leastactive"

Review comment:
       I think should add comment for this public var

##########
File path: cluster/cluster.go
##########
@@ -21,7 +21,8 @@ import (
 	"github.com/apache/dubbo-go/protocol"
 )
 
-// Cluster ...
+// Cluster
+//Extension - Cluster

Review comment:
       ```suggestion
   // Extension - Cluster
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #584: Ftr: add comment for cluster

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#issuecomment-637963062


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=h1) Report
   > Merging [#584](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **decrease** coverage by `0.26%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/584/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #584      +/-   ##
   ===========================================
   - Coverage    66.43%   66.16%   -0.27%     
   ===========================================
     Files          184      184              
     Lines         9712     9709       -3     
   ===========================================
   - Hits          6452     6424      -28     
   - Misses        2620     2642      +22     
   - Partials       640      643       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `73.33% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failback\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failover\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbG92ZXJfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failsafe\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbHNhZmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/forking\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZm9ya2luZ19jbHVzdGVyLmdv) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/registry\_aware\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvcmVnaXN0cnlfYXdhcmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | ... and [14 more](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?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/dubbo-go/pull/584?src=pr&el=footer). Last update [4af26b9...0a06522](https://codecov.io/gh/apache/dubbo-go/pull/584?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #584: Ftr: add comment for cluster

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#discussion_r434673549



##########
File path: cluster/loadbalance/least_active.go
##########
@@ -39,7 +38,9 @@ func init() {
 type leastActiveLoadBalance struct {
 }
 
-// NewLeastActiveLoadBalance ...
+// NewLeastActiveLoadBalance returns least active load balance
+//
+// A random mechanism based on actives, actives means the num of requests a consumer have sent but not return yet

Review comment:
       // NewLeastActiveLoadBalance returns a least active load balance instance.
   //
   // A random mechanism based on actives, actives means the number of a consumer's requests have been sent to provider but not yet got response.

##########
File path: cluster/cluster_impl/mock_cluster.go
##########
@@ -24,7 +24,11 @@ import (
 
 type mockCluster struct{}
 
-// NewMockCluster ...
+// NewMockCluster returns mock cluster instance
+//
+// Mock cluster is usually used for service degradation, such as an authentication service.
+// When the service provider is completely hung up, the client does not throw an exception,
+// but returns the authorization failure through the Mock data.

Review comment:
       // NewMockCluster returns a mock cluster instance.
   //
   // Mock cluster is usually used for service degradation, such as an authentication service.
   // When the service provider is completely hung up, the client does not throw an exception,
   // return an authorization failure through the Mock data instead.

##########
File path: cluster/cluster_impl/broadcast_cluster.go
##########
@@ -31,7 +31,10 @@ func init() {
 	extension.SetCluster(broadcast, NewBroadcastCluster)
 }
 
-// NewBroadcastCluster ...
+// NewBroadcastCluster returns broadcast cluster instance
+//
+// Calling all providers broadcast, one by one call, any error is reported.

Review comment:
       // NewBroadcastCluster returns a broadcast cluster instance.
   //
   // Calling all providers' broadcast one by one. All errors will be reported.

##########
File path: cluster/cluster_impl/failfast_cluster.go
##########
@@ -31,7 +31,10 @@ func init() {
 	extension.SetCluster(failfast, NewFailFastCluster)
 }
 
-// NewFailFastCluster ...
+// NewFailFastCluster returns failfast cluster instance
+//
+// Fast failure, only made a call, failure immediately error. Usually used for non-idempotent write operations,
+// such as adding records.

Review comment:
       // NewFailFastCluster returns a failfast cluster instance.
   //
   // Fast failure, only made a call, failure immediately error. Usually used for non-idempotent write operations,
   // such as adding records.

##########
File path: cluster/cluster_impl/registry_aware_cluster.go
##########
@@ -29,7 +29,7 @@ func init() {
 	extension.SetCluster("registryAware", NewRegistryAwareCluster)
 }
 
-// NewRegistryAwareCluster ...
+// NewRegistryAwareCluster returns registry aware cluster instance

Review comment:
       // NewRegistryAwareCluster returns a registry aware cluster instance.

##########
File path: cluster/cluster_impl/failsafe_cluster.go
##########
@@ -31,7 +31,9 @@ func init() {
 	extension.SetCluster(failsafe, NewFailsafeCluster)
 }
 
-// NewFailsafeCluster ...
+// NewFailsafeCluster returns failsafe cluster instance
+//
+// Failure of security, anomalies, directly ignored. Usually used to write audit logs and other operations.

Review comment:
       // NewFailsafeCluster returns an failsafe cluster instance.
   //
   // Failure of security, anomalies, directly ignored. Usually it is 
   //  used to write audit logs and other operations.

##########
File path: cluster/cluster_impl/available_cluster_invoker.go
##########
@@ -35,7 +35,7 @@ type availableClusterInvoker struct {
 	baseClusterInvoker
 }
 
-// NewAvailableClusterInvoker ...
+// NewAvailableClusterInvoker returns cluster invoker instance

Review comment:
       NewAvailableClusterInvoker returns a cluster invoker instance

##########
File path: cluster/loadbalance/random.go
##########
@@ -38,7 +38,9 @@ func init() {
 type randomLoadBalance struct {
 }
 
-// NewRandomLoadBalance ...
+// NewRandomLoadBalance returns random load balance instance
+//
+// Set random probabilities by weight, the request sent to provider is random

Review comment:
       // NewRandomLoadBalance returns a random load balance instance.
   //
   // Set random probabilities by weight, and the request will be sent to provider randomly.

##########
File path: cluster/cluster_impl/failback_cluster.go
##########
@@ -31,7 +31,10 @@ func init() {
 	extension.SetCluster(failback, NewFailbackCluster)
 }
 
-// NewFailbackCluster ...
+// NewFailbackCluster returns failback cluster instance

Review comment:
       NewFailbackCluster returns a failback cluster instance.

##########
File path: cluster/loadbalance/round_robin.go
##########
@@ -52,7 +52,9 @@ func init() {
 
 type roundRobinLoadBalance struct{}
 
-// NewRoundRobinLoadBalance ...
+// NewRoundRobinLoadBalance returns round robin load balance

Review comment:
       NewFailFastCluster returns a failfast cluster instance

##########
File path: cluster/loadbalance/least_active.go
##########
@@ -28,7 +28,6 @@ import (
 )
 
 const (
-	// LeastActive ...
 	LeastActive = "leastactive"

Review comment:
       yes.

##########
File path: cluster/cluster_impl/forking_cluster.go
##########
@@ -31,7 +31,10 @@ func init() {
 	extension.SetCluster(forking, NewForkingCluster)
 }
 
-// NewForkingCluster ...
+// NewForkingCluster returns forking cluster instance
+//
+// Multiple servers are invoked in parallel, returning as soon as one succeeds.
+// Usually used for real-time demanding read operations, but need to waste more service resources.

Review comment:
       // NewForkingCluster returns a forking cluster instance.
   //
   // Multiple servers will be invoked in parallel at the same time, and return asap when 
   // getting response from  the fastest server. 
   // Usually it is used for real-time demanding read operations while wasting more service resources.

##########
File path: cluster/cluster_impl/failover_cluster.go
##########
@@ -31,7 +31,11 @@ func init() {
 	extension.SetCluster(name, NewFailoverCluster)
 }
 
-// NewFailoverCluster ...
+// NewFailoverCluster returns failover cluster instance
+//
+// Failure automatically switch, when there is failure,
+// retry the other server (default). Usually used for read operations,
+// but retries can result in longer delays.

Review comment:
       // NewFailoverCluster returns a failover cluster instance.
   //
   // Failure automatically switch, when there is a failure,
   // retry the other server (default). Usually used for read operations,
   // but retries can result in longer delays.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter commented on pull request #584: Feat: add comment for cluster

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#issuecomment-637963062


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=h1) Report
   > Merging [#584](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **decrease** coverage by `0.26%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/584/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #584      +/-   ##
   ===========================================
   - Coverage    66.43%   66.16%   -0.27%     
   ===========================================
     Files          184      184              
     Lines         9712     9709       -3     
   ===========================================
   - Hits          6452     6424      -28     
   - Misses        2620     2642      +22     
   - Partials       640      643       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `73.33% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failback\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failover\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbG92ZXJfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failsafe\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbHNhZmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/forking\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZm9ya2luZ19jbHVzdGVyLmdv) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/registry\_aware\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvcmVnaXN0cnlfYXdhcmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | ... and [14 more](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?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/dubbo-go/pull/584?src=pr&el=footer). Last update [4af26b9...d040f32](https://codecov.io/gh/apache/dubbo-go/pull/584?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #584: Ftr: add comment for cluster

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#issuecomment-637963062


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=h1) Report
   > Merging [#584](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/4af26b99cdcea223122bec0e90767bd56fad99f8&el=desc) will **increase** coverage by `0.23%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/584/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #584      +/-   ##
   ===========================================
   + Coverage    66.43%   66.66%   +0.23%     
   ===========================================
     Files          184      184              
     Lines         9712     9690      -22     
   ===========================================
   + Hits          6452     6460       +8     
   + Misses        2620     2592      -28     
   + Partials       640      638       -2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/584?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `73.33% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXIuZ28=) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failback\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failover\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbG92ZXJfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/failsafe\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbHNhZmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/forking\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZm9ya2luZ19jbHVzdGVyLmdv) | `100.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | [cluster/cluster\_impl/registry\_aware\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvcmVnaXN0cnlfYXdhcmVfY2x1c3Rlci5nbw==) | `100.00% <ø> (ø)` | |
   | ... and [19 more](https://codecov.io/gh/apache/dubbo-go/pull/584/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/584?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/dubbo-go/pull/584?src=pr&el=footer). Last update [4af26b9...0a06522](https://codecov.io/gh/apache/dubbo-go/pull/584?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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zouyx merged pull request #584: Ftr: add comment for cluster

Posted by GitBox <gi...@apache.org>.
zouyx merged pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584


   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org