Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions gateway/dataimpl/server_v1/xdcrserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,20 @@ func (s *XdcrServer) GetClusterInfo(ctx context.Context, in *internal_xdcr_v1.Ge
return nil, errSt.Err()
}

clusterInfo, err := clusterAgent.GetClusterInfo(ctx, &cbmgmtx.GetClusterInfoOptions{
clusterInfo, err := clusterAgent.GetAggregatedClusterInfo(ctx, &gocbcorex.GetAggregatedClusterInfoOptions{
OnBehalfOf: oboUser,
})
if err != nil {
return nil, s.errorHandler.NewGenericStatus(ctx, err).Err()
}

var edition internal_xdcr_v1.ClusterEdition
if clusterInfo.IsEnterprise {
if clusterInfo.AllEnterprise {
edition = internal_xdcr_v1.ClusterEdition_CLUSTER_EDITION_ENTERPRISE
} else {
} else if clusterInfo.AllCommunity {
edition = internal_xdcr_v1.ClusterEdition_CLUSTER_EDITION_COMMUNITY
} else {
edition = internal_xdcr_v1.ClusterEdition_CLUSTER_EDITION_MIXED
}

return &internal_xdcr_v1.GetClusterInfoResponse{
Expand Down
1 change: 1 addition & 0 deletions gateway/test/xdcr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func (s *GatewayOpsTestSuite) TestXdcrGetClusterInfo() {
require.Contains(s.T(), []internal_xdcr_v1.ClusterEdition{
internal_xdcr_v1.ClusterEdition_CLUSTER_EDITION_COMMUNITY,
internal_xdcr_v1.ClusterEdition_CLUSTER_EDITION_ENTERPRISE,
internal_xdcr_v1.ClusterEdition_CLUSTER_EDITION_MIXED,
}, *clusterInfoResp.Edition)
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets v0.12.0
github.com/aws/aws-sdk-go-v2/config v1.32.8
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.41.1
github.com/couchbase/gocbcorex v0.0.0-20260302200007-00087f22161f
github.com/couchbase/goprotostellar v1.0.6-0.20260407143512-d7af25156dcc
github.com/couchbase/gocbcorex v0.0.0-20260427194529-5580e123837f
github.com/couchbase/goprotostellar v1.0.6-0.20260427185542-d3cc7955fca9
github.com/couchbaselabs/gocbconnstr v1.0.5
github.com/couchbaselabs/gocbconnstr/v2 v2.0.0
github.com/fsnotify/fsnotify v1.9.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 h1:6xNmx7iTtyBRev0+D/Tv1FZd4SCg8axKApyNyRsAt/w=
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5/go.mod h1:KdCmV+x/BuvyMxRnYBlmVaq4OLiKW6iRQfvC62cvdkI=
github.com/couchbase/gocbcorex v0.0.0-20260302200007-00087f22161f h1:eGRME9PeeeSGK+g/2Ixz5CiEaQbuo2lN7/NMA50p+To=
github.com/couchbase/gocbcorex v0.0.0-20260302200007-00087f22161f/go.mod h1:yhzN/7UDbjYEYD9Ee7gOMD5f4ViYT4QjnnjrATiwcoQ=
github.com/couchbase/goprotostellar v1.0.6-0.20260407143512-d7af25156dcc h1:wQfvYGOutMCo9be0xnHtM1FqnwKcmPVGRPx6xXw5wOo=
github.com/couchbase/goprotostellar v1.0.6-0.20260407143512-d7af25156dcc/go.mod h1:X58ot5FRqlBTBkwG/oI4klunpu4MApjGktheqeRWQw0=
github.com/couchbase/gocbcorex v0.0.0-20260427194529-5580e123837f h1:WT0OOCoEb9TdQ70nXB9YOresJY71jDbWH/cPlXD8Ahk=
github.com/couchbase/gocbcorex v0.0.0-20260427194529-5580e123837f/go.mod h1:yhzN/7UDbjYEYD9Ee7gOMD5f4ViYT4QjnnjrATiwcoQ=
github.com/couchbase/goprotostellar v1.0.6-0.20260427185542-d3cc7955fca9 h1:qf77TOXsWpty1oQ7XEvnbWb7kiBrM4Z7wm9MEnilJMA=
github.com/couchbase/goprotostellar v1.0.6-0.20260427185542-d3cc7955fca9/go.mod h1:X58ot5FRqlBTBkwG/oI4klunpu4MApjGktheqeRWQw0=
github.com/couchbaselabs/gocbconnstr v1.0.5 h1:e0JokB5qbcz7rfnxEhNRTKz8q1svoRvDoZihsiwNigA=
github.com/couchbaselabs/gocbconnstr v1.0.5/go.mod h1:KV3fnIKMi8/AzX0O9zOrO9rofEqrRF1d2rG7qqjxC7o=
github.com/couchbaselabs/gocbconnstr/v2 v2.0.0 h1:HU9DlAYYWR69jQnLN6cpg0fh0hxW/8d5hnglCXXjW78=
Expand Down
Loading