wangbo commented on code in PR #38486: URL: https://github.com/apache/doris/pull/38486#discussion_r1697802784
########## 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: wg的tag只要带逗号的,就不可能为空的,写入的时候做校验了 String tagStr = properties.get(TAG); if (!StringUtils.isEmpty(tagStr)) { String[] tagArr = tagStr.split(","); for (String tag : tagArr) { try { FeNameFormat.checkCommonName("workload group tag name", tag); } catch (AnalysisException e) { throw new DdlException("workload group tag name format is illegal, " + tagStr); } } } -- 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