gaozhangmin commented on code in PR #19013:
URL: https://github.com/apache/pulsar/pull/19013#discussion_r1054121812


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -2764,51 +2764,62 @@ private PositionImpl calculatePositionAckSet(boolean 
isExcluded, int batchSize,
     protected void internalGetMessageById(AsyncResponse asyncResponse, long 
ledgerId, long entryId,
                                               boolean authoritative) {
         // will redirect if the topic not owned by current broker
-        validateTopicOwnershipAsync(topicName, authoritative)
-                .thenCompose(__ -> validateTopicOperationAsync(topicName, 
TopicOperation.PEEK_MESSAGES))
-                .thenCompose(__ -> {
-                    CompletableFuture<Void> ret;
-                    if (topicName.isGlobal()) {
-                        ret = 
validateGlobalNamespaceOwnershipAsync(namespaceName);
+        getPartitionedTopicMetadataAsync(topicName, authoritative, false)
+                .thenAccept(partitionMetadata -> {
+                    if (!topicName.isPartitioned() && 
partitionMetadata.partitions > 0) {

Review Comment:
   done. @Technoboy- 



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