private Set<String> getMatchedRecords(Set<String> topicNameSet,
            Set<Integer> brokerIdSet) {
        ConcurrentHashSet<String> keySet;
        Set<String> topicKeySet = null;
        Set<String> brokerKeySet = null;
        Set<String> matchedKeySet = null;
        // get deploy records set by topicName
        if (topicNameSet != null && !topicNameSet.isEmpty()) {
            topicKeySet = new HashSet<>();
            for (String topicName : topicNameSet) {
                keySet = topicName2RecordCache.get(topicName);
                if (keySet != null && !keySet.isEmpty()) {
                    topicKeySet.addAll(keySet);
                }
            }
            if (topicKeySet.isEmpty()) {
                return Collections.emptySet();
            }
        }
        // get deploy records set by brokerId
        if (brokerIdSet != null && !brokerIdSet.isEmpty()) {
            brokerKeySet = new HashSet<>();
            for (Integer brokerId : brokerIdSet) {
                keySet = brokerId2RecordCache.get(brokerId);
                if (keySet != null && !keySet.isEmpty()) {
                    brokerKeySet.addAll(keySet);
                }
            }
            if (brokerKeySet.isEmpty()) {
                return Collections.emptySet();
            }
        }
        // get intersection from topicKeySet and brokerKeySet
        if (topicKeySet != null || brokerKeySet != null) {
            if (topicKeySet == null) {
                matchedKeySet = new HashSet<>(brokerKeySet);
            } else {
                if (brokerKeySet == null) {
                    matchedKeySet = new HashSet<>(topicKeySet);
                } else {
                    matchedKeySet = new HashSet<>();
                    for (String record : topicKeySet) {
                        if (brokerKeySet.contains(record)) {
                            matchedKeySet.add(record);
                        }
                    }
                }
            }
        }
        return matchedKeySet;
    }
Delete topic deploy configure information from persistent storage

@param recordKey  the record key
@param strBuff    the string buffer
@return the process result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/metamanage/metastore/impl/AbsTopicDeployMapperImpl.java