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 2022/04/18 09:39:50 UTC

[GitHub] [pulsar] gaozhangmin commented on a diff in pull request #15120: [improve][Rest api]Remove duplication validateTopicOwnershipAsync

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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -1725,11 +1726,7 @@ protected void internalSkipAllMessages(AsyncResponse asyncResponse, String subNa
     private CompletableFuture<Void> internalSkipAllMessagesForNonPartitionedTopicAsync(AsyncResponse asyncResponse,
                                                                                        String subName,
                                                                                        boolean authoritative) {
-        return validateTopicOwnershipAsync(topicName, authoritative)
-            .thenCompose(__ ->
-                validateTopicOperationAsync(topicName, TopicOperation.SKIP, subName))
-            .thenCompose(__ ->

Review Comment:
   Call these two method outside of  this method.



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