You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "hanahmily (via GitHub)" <gi...@apache.org> on 2025/05/26 00:48:11 UTC

[PR] Support configurable replica count on Group [skywalking-banyandb]

hanahmily opened a new pull request, #675:
URL: https://github.com/apache/skywalking-banyandb/pull/675

   
   - [x] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [x] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Fixes apache/skywalking#12872.
   - [x] Update the [`CHANGES` log](https://github.com/apache/skywalking-banyandb/blob/main/CHANGES.md).
   


-- 
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@skywalking.apache.org

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


Re: [PR] Support configurable replica count on Group [skywalking-banyandb]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #675:
URL: https://github.com/apache/skywalking-banyandb/pull/675#discussion_r2106363280


##########
pkg/node/round_robin.go:
##########
@@ -231,6 +232,19 @@ func validateGroup(group *commonv1.Group) bool {
 }
 
 type key struct {
-	group   string
-	shardID uint32
+	group    string
+	shardID  uint32
+	replicas uint32
+}
+
+func (k key) equal(other key) bool {
+	return k.group == other.group && k.shardID == other.shardID

Review Comment:
   The `equal` method ignores the `replicas` field, so different replica entries compare equal and the selector will always pick the first matching shard. Include `replicas` in the comparison.
   ```suggestion
   	return k.group == other.group && k.shardID == other.shardID && k.replicas == other.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@skywalking.apache.org

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


Re: [PR] Support configurable replica count on Group [skywalking-banyandb]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #675:
URL: https://github.com/apache/skywalking-banyandb/pull/675


-- 
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@skywalking.apache.org

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


Re: [PR] Support configurable replica count on Group [skywalking-banyandb]

Posted by "hanahmily (via GitHub)" <gi...@apache.org>.
hanahmily commented on code in PR #675:
URL: https://github.com/apache/skywalking-banyandb/pull/675#discussion_r2106365093


##########
pkg/node/round_robin.go:
##########
@@ -231,6 +232,19 @@ func validateGroup(group *commonv1.Group) bool {
 }
 
 type key struct {
-	group   string
-	shardID uint32
+	group    string
+	shardID  uint32
+	replicas uint32
+}
+
+func (k key) equal(other key) bool {
+	return k.group == other.group && k.shardID == other.shardID

Review Comment:
   It has a purpose. The distribution structure has two levels: the first is based on group and shardID, while the second uses the replica. The equal method belongs to the first level.



-- 
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@skywalking.apache.org

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