You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/11 10:35:09 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #12749: [Transaction] Fix transaction system topic create in loop.

eolivelli commented on a change in pull request #12749:
URL: https://github.com/apache/pulsar/pull/12749#discussion_r747385380



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -244,6 +245,13 @@ protected void validateAdminAndClientPermission() {
         }
     }
 
+    protected void validateTopicAllowdToCreate(TopicName topicName) {

Review comment:
       typo: validateCreateTopic

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -1649,14 +1649,21 @@ public void shutdownNow() {
     }
 
 
-    private static boolean isTransactionSystemTopic(TopicName topicName) {
+    public static boolean isTransactionSystemTopic(TopicName topicName) {
         String topic = topicName.toString();
         return topic.startsWith(TopicName.TRANSACTION_COORDINATOR_ASSIGN.toString())
                 || topic.startsWith(TopicName.get(TopicDomain.persistent.value(),
                 NamespaceName.SYSTEM_NAMESPACE, TRANSACTION_LOG_PREFIX).toString())
                 || topic.endsWith(MLPendingAckStore.PENDING_ACK_STORE_SUFFIX);
     }
 
+    public static boolean isNotAllowedToCreateTopic(TopicName topicName) {
+        String topic = topicName.toString();
+        return topic.startsWith(TopicName.get(TopicDomain.persistent.value(),

Review comment:
       what about creating a constant for this ? "TopicName.get(TopicDomain.persistent.value(), NamespaceName.SYSTEM_NAMESPACE, TRANSACTION_LOG_PREFIX).toString()"




-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org