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/07/10 06:06:04 UTC

[GitHub] [pulsar] HQebupt opened a new pull request, #16507: [improve][broker][PIP-149]make getMaxConsumersPerSubscription method async in Namespaces

HQebupt opened a new pull request, #16507:
URL: https://github.com/apache/pulsar/pull/16507

   ### Motivation
   
   See #14365 
   
   ### Verifying this change
   
   Make sure that the change passes the CI checks.
   
   ### Does this pull request potentially affect one of the following parts:
   
   If `yes` was chosen, please highlight the changes
   
   - Dependencies (does it add or upgrade a dependency): (no)
   - The public API: (no)
   - The schema: (no)
   - The default values of configurations: (no)
   - The wire protocol: (no)
   - The rest endpoints: (no)
   - The admin cli options: (no)
   - Anything that affects deployment: (no)
   
   ### Documentation
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   - [x] `doc-not-needed` 
   


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


[GitHub] [pulsar] HQebupt commented on pull request #16507: [improve][broker][PIP-149]make getMaxConsumersPerSubscription method async in Namespaces

Posted by GitBox <gi...@apache.org>.
HQebupt commented on PR #16507:
URL: https://github.com/apache/pulsar/pull/16507#issuecomment-1179674462

   /pulsarbot run-failure-checks


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


[GitHub] [pulsar] HQebupt commented on pull request #16507: [improve][broker][PIP-149]make getMaxConsumersPerSubscription method async in Namespaces

Posted by GitBox <gi...@apache.org>.
HQebupt commented on PR #16507:
URL: https://github.com/apache/pulsar/pull/16507#issuecomment-1179889715

   /pulsarbot run-failure-checks


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


[GitHub] [pulsar] codelipenghui merged pull request #16507: [improve][broker][PIP-149]make getMaxConsumersPerSubscription method async in Namespaces

Posted by GitBox <gi...@apache.org>.
codelipenghui merged PR #16507:
URL: https://github.com/apache/pulsar/pull/16507


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


[GitHub] [pulsar] HQebupt commented on a diff in pull request #16507: [improve][broker][PIP-149]make getMaxConsumersPerSubscription method async in Namespaces

Posted by GitBox <gi...@apache.org>.
HQebupt commented on code in PR #16507:
URL: https://github.com/apache/pulsar/pull/16507#discussion_r917494075


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java:
##########
@@ -1325,11 +1325,21 @@ public void setMaxConsumersPerTopic(@PathParam("property") String property, @Pat
     @ApiOperation(value = "Get maxConsumersPerSubscription config on a namespace.")
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have admin permission"),
             @ApiResponse(code = 404, message = "Namespace does not exist")})
-    public Integer getMaxConsumersPerSubscription(@PathParam("property") String property,
-                                              @PathParam("cluster") String cluster,
-                                              @PathParam("namespace") String namespace) {
+    public void getMaxConsumersPerSubscription(
+            @Suspended final AsyncResponse asyncResponse,
+            @PathParam("property") String property,
+            @PathParam("cluster") String cluster,
+            @PathParam("namespace") String namespace) {
         validateNamespaceName(property, cluster, namespace);
-        return internalGetMaxConsumersPerSubscription();

Review Comment:
   Sure.



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


[GitHub] [pulsar] codelipenghui commented on a diff in pull request #16507: [improve][broker][PIP-149]make getMaxConsumersPerSubscription method async in Namespaces

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on code in PR #16507:
URL: https://github.com/apache/pulsar/pull/16507#discussion_r917472081


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java:
##########
@@ -1325,11 +1325,21 @@ public void setMaxConsumersPerTopic(@PathParam("property") String property, @Pat
     @ApiOperation(value = "Get maxConsumersPerSubscription config on a namespace.")
     @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have admin permission"),
             @ApiResponse(code = 404, message = "Namespace does not exist")})
-    public Integer getMaxConsumersPerSubscription(@PathParam("property") String property,
-                                              @PathParam("cluster") String cluster,
-                                              @PathParam("namespace") String namespace) {
+    public void getMaxConsumersPerSubscription(
+            @Suspended final AsyncResponse asyncResponse,
+            @PathParam("property") String property,
+            @PathParam("cluster") String cluster,
+            @PathParam("namespace") String namespace) {
         validateNamespaceName(property, cluster, namespace);
-        return internalGetMaxConsumersPerSubscription();

Review Comment:
   Looks like we can remove `internalGetMaxConsumersPerSubscription`?



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


[GitHub] [pulsar] HQebupt commented on pull request #16507: [improve][broker][PIP-149]make getMaxConsumersPerSubscription method async in Namespaces

Posted by GitBox <gi...@apache.org>.
HQebupt commented on PR #16507:
URL: https://github.com/apache/pulsar/pull/16507#issuecomment-1179695103

   /pulsarbot run-failure-checks


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


[GitHub] [pulsar] HQebupt commented on pull request #16507: [improve][broker][PIP-149]make getMaxConsumersPerSubscription method async in Namespaces

Posted by GitBox <gi...@apache.org>.
HQebupt commented on PR #16507:
URL: https://github.com/apache/pulsar/pull/16507#issuecomment-1179743637

   /pulsarbot run-failure-checks


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