jt2594838 commented on code in PR #17780:
URL: https://github.com/apache/iotdb/pull/17780#discussion_r3339464993
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionTopicAgent.java:
##########
@@ -188,4 +195,73 @@ public Map<String, TopicConfig> getTopicConfigs(final
Set<String> topicNames) {
releaseReadLock();
}
}
+
+ public TSStatus checkTopicOwner(final ConsumerConfig consumerConfig, final
String topicName) {
+ acquireReadLock();
+ try {
+ if (!topicMetaKeeper.containsTopicMeta(topicName)) {
+ return RpcUtils.SUCCESS_STATUS;
+ }
+
+ final TopicMeta topicMeta = topicMetaKeeper.getTopicMeta(topicName);
+ if (!topicMeta.isOwnerFencingEnabled()) {
+ return RpcUtils.SUCCESS_STATUS;
+ }
Review Comment:
Is it possible to merge contains and get?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]