yiguolei commented on code in PR #38486: URL: https://github.com/apache/doris/pull/38486#discussion_r1697795182
########## fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java: ########## @@ -605,11 +619,39 @@ public TopicInfo toTopicInfo() { tWorkloadGroupInfo.setRemoteReadBytesPerSecond(Long.valueOf(remoteReadBytesPerSecStr)); } + String tagStr = properties.get(TAG); + if (!StringUtils.isEmpty(tagStr)) { + tWorkloadGroupInfo.setTag(tagStr); + } + TopicInfo topicInfo = new TopicInfo(); topicInfo.setWorkloadGroupInfo(tWorkloadGroupInfo); return topicInfo; } + public static boolean isMatchBackendTag(String wgTagStr, String beTagStr) { + if (StringUtils.isEmpty(wgTagStr)) { + return true; + } + if (StringUtils.isEmpty(beTagStr)) { + return false; + } + + String[] wgTagArr = wgTagStr.split(","); + Set<String> wgTagSet = new HashSet<>(); + for (String wgTag : wgTagArr) { + wgTagSet.add(wgTag.trim()); Review Comment: trim 之后,要检查这个字符串是否是空字符串。 比如 “ , a” 这种情况,就会往wgTagSet 里放空string,空string的匹配就不确定了 -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org