Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster not found #4501

Merged
merged 3 commits into from
Jun 16, 2023
Merged
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
12 changes: 10 additions & 2 deletions client/clientBean.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ func (h *clientBeanImpl) GetRemoteAdminClient(cluster string) (adminservice.Admi

clusterInfo, clusterFound := h.clusterMetadata.GetAllClusterInfo()[cluster]
if !clusterFound {
return nil, &serviceerror.NotFound{
// We intentionally return internal error here.
// This error could only happen with internal mis-configuration.
// This can happen when a namespace is config for multiple clusters. But those clusters are not connected.
// We also have logic in task processing to drop tasks when namespace cluster exclude a local cluster.
return nil, &serviceerror.Internal{
Message: fmt.Sprintf(
"Unknown cluster name: %v with given cluster information map: %v.",
cluster,
Expand Down Expand Up @@ -229,7 +233,11 @@ func (h *clientBeanImpl) GetRemoteFrontendClient(clusterName string) (grpc.Clien

clusterInfo, clusterFound := h.clusterMetadata.GetAllClusterInfo()[clusterName]
if !clusterFound {
return nil, nil, &serviceerror.NotFound{
// We intentionally return internal error here.
// This error could only happen with internal mis-configuration.
// This can happen when a namespace is config for multiple clusters. But those clusters are not connected.
// We also have logic in task processing to drop tasks when namespace cluster exclude a local cluster.
return nil, nil, &serviceerror.Internal{
Message: fmt.Sprintf(
"Unknown clusterName name: %v with given clusterName information map: %v.",
clusterName,
Expand Down