codelipenghui commented on a change in pull request #11304:
URL: https://github.com/apache/pulsar/pull/11304#discussion_r668864177



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -1930,7 +1930,7 @@ protected void 
handleEndTxnOnPartition(CommandEndTxnOnPartition command) {
             log.debug("[{}] handleEndTxnOnPartition txnId: [{}], txnAction: 
[{}]", topic,
                     txnID, txnAction);
         }
-        CompletableFuture<Optional<Topic>> topicFuture = 
service.getTopics().get(TopicName.get(topic).toString());
+        CompletableFuture<Optional<Topic>> topicFuture = 
service.getTopic(topic, true);

Review comment:
       Users can disable the topic auto-creation, this means they want to 
prevent the topic auto-creation. After this change, the TC might re-create a 
topic even if the topic has been deleted definitely. This will break the 
behavior of topic auto-creation disabled.
   
   I think the current fix is:
   
   1. If the topic has been deleted, we should skip all the TC logs of this 
topic.
   2. If the topic has not been deleted but only not loaded by any broker, we 
can load the topic and complete the transaction.
   
   WDYT @congbobo184 




-- 
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]


Reply via email to