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 2021/12/08 08:50:16 UTC

[GitHub] [pulsar] yuruguo opened a new pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

yuruguo opened a new pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192


   ### Motivation
   Currently, the CLI supports `set`/`get`/`remove` operation to the `maxConsumersPerSubscription` of `v1/namespace` and `v2/namespace`, and the server provides corresponding processing interfaces, including:
   1. v1/namespace
   - setMaxConsumersPerSubscription
   - getMaxConsumersPerSubscription
   - ~~removeMaxConsumersPerSubscription~~
   2. v2/namespace
   - setMaxConsumersPerSubscription
   - getMaxConsumersPerSubscription
   - removeMaxConsumersPerSubscription
   
   However, the remove interface is missing for v1/namespace, so the purpose of this PR is to supplement this processing interface.
   
   ### Documentation
   - [x] `no-need-doc` 
   
   


-- 
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] yuruguo removed a comment on pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

Posted by GitBox <gi...@apache.org>.
yuruguo removed a comment on pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192#issuecomment-988661506


   /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] yuruguo commented on pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

Posted by GitBox <gi...@apache.org>.
yuruguo commented on pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192#issuecomment-988661506


   /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] yuruguo removed a comment on pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

Posted by GitBox <gi...@apache.org>.
yuruguo removed a comment on pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192#issuecomment-988625057


   @merlimat @lhotari @codelipenghui @315157973 Would you help review this PR?


-- 
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] yuruguo commented on a change in pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

Posted by GitBox <gi...@apache.org>.
yuruguo commented on a change in pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192#discussion_r764666813



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java
##########
@@ -1094,7 +1094,7 @@ 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 int getMaxConsumersPerSubscription(@PathParam("property") String property,
+    public Integer getMaxConsumersPerSubscription(@PathParam("property") String property,

Review comment:
       **Note**: 
   The `maxConsumersPerSubscription` will become `null` When the `removeMaxConsumersPerSubscription` method is executed, and then `NPE` will appear If you get maxConsumersPerSubscription next, so we need to change `int` to `Integer`.




-- 
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] yuruguo commented on pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

Posted by GitBox <gi...@apache.org>.
yuruguo commented on pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192#issuecomment-988625057


   @merlimat @lhotari @codelipenghui @315157973 Would you help review this PR?


-- 
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 #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

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


   


-- 
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] yuruguo commented on pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

Posted by GitBox <gi...@apache.org>.
yuruguo commented on pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192#issuecomment-988821415


   @merlimat @lhotari @codelipenghui @Technoboy- Would you help review this PR? thx!


-- 
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 #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

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


   


-- 
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] yuruguo commented on a change in pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

Posted by GitBox <gi...@apache.org>.
yuruguo commented on a change in pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192#discussion_r764666813



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java
##########
@@ -1094,7 +1094,7 @@ 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 int getMaxConsumersPerSubscription(@PathParam("property") String property,
+    public Integer getMaxConsumersPerSubscription(@PathParam("property") String property,

Review comment:
       **Note**: 
   The `maxConsumersPerSubscription` will become `null` When the `removeMaxConsumersPerSubscription` method is executed, and then `NPE` will appear when get maxConsumersPerSubscription, so we need to change `int` to `Integer`.




-- 
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] yuruguo edited a comment on pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

Posted by GitBox <gi...@apache.org>.
yuruguo edited a comment on pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192#issuecomment-988821415


   @merlimat @codelipenghui @gaoran10 @Technoboy- Would you help review this PR? thx!


-- 
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] yuruguo removed a comment on pull request #13192: [Broker] Add removeMaxConsumersPerSubscription method for v1 namespace

Posted by GitBox <gi...@apache.org>.
yuruguo removed a comment on pull request #13192:
URL: https://github.com/apache/pulsar/pull/13192#issuecomment-988821415


   @merlimat @codelipenghui @gaoran10 @Technoboy- Would you help review this PR? thx!


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