This is an automated email from the ASF dual-hosted git repository.
aloyszhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 0aedc7789c [INLONG-10730][Manager] Fix auto-assign wrong
Sortstandalone cluster when no cluster is under the tag (#10731)
0aedc7789c is described below
commit 0aedc7789c3a7f1718e788a17d1c0a18cdc0a522
Author: vernedeng <[email protected]>
AuthorDate: Mon Jul 29 16:06:00 2024 +0800
[INLONG-10730][Manager] Fix auto-assign wrong Sortstandalone cluster when
no cluster is under the tag (#10731)
---
.../resource/sink/AbstractStandaloneSinkResourceOperator.java | 6 ------
1 file changed, 6 deletions(-)
diff --git
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/AbstractStandaloneSinkResourceOperator.java
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/AbstractStandaloneSinkResourceOperator.java
index 24aeeb9224..d5a97a42b1 100644
---
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/AbstractStandaloneSinkResourceOperator.java
+++
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/AbstractStandaloneSinkResourceOperator.java
@@ -120,12 +120,6 @@ public abstract class
AbstractStandaloneSinkResourceOperator implements SinkReso
// if some clusters have the same tag
List<InlongClusterEntity> clusters =
clusterEntityMapper.selectByKey(group.getInlongClusterTag(),
null, sortClusterType);
- if (!CollectionUtils.isEmpty(clusters)) {
- return clusters.get(rand.nextInt(clusters.size())).getName();
- }
-
- // if no cluster with the same tag
- clusters = clusterEntityMapper.selectByKey(null, null,
sortClusterType);
return CollectionUtils.isEmpty(clusters) ? null :
clusters.get(rand.nextInt(clusters.size())).getName();