liangyepianzhou commented on code in PR #20569:
URL: https://github.com/apache/pulsar/pull/20569#discussion_r1230560236


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/SnapshotSegmentAbortedTxnProcessorImpl.java:
##########
@@ -381,10 +382,11 @@ public void 
openReadOnlyManagedLedgerFailed(ManagedLedgerException exception, Ob
 
     // This method will be deprecated and removed in version 4.x.0
     private CompletableFuture<PositionImpl> recoverOldSnapshot() {
-        return 
topic.getBrokerService().getTopic(TopicName.get(topic.getName()).getNamespace() 
+ "/"
-                        + SystemTopicNames.TRANSACTION_BUFFER_SNAPSHOT, false)
-                .thenCompose(topicOption -> {
-                    if (!topicOption.isPresent()) {
+        return 
topic.getBrokerService().getPulsar().getPulsarResources().getTopicResources()
+                
.listPersistentTopicsAsync(NamespaceName.get(TopicName.get(topic.getName()).getNamespace()))
+                .thenCompose(topics -> {

Review Comment:
   Are you concerned that this will consume metadata resources? As for this 
aspect, I think it's okay because the upgrade operation is only performed when 
enabling the topic load of the new feature. Additionally, we have also 
implemented lazy loading for the transaction buffer; see 
https://github.com/apache/pulsar/pull/20559.



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