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/09/29 16:00:34 UTC

[GitHub] [pulsar] yuruguo opened a new pull request #12242: [pulsar-admin] Add --reset-mode option to optimize topic rate setting policy

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


   ### Motivation
   Currently we can use cli `./pulsar-admin topics set-publish-rate` / `./pulsar-admin topics set-dispatch-rate` to set message publish/dispatch rate for a topic, but its effect is to clear the previous rate and then reset which causes the previously rate to disappear (unless I specifically add the previous rate when I set it again), for example:
   **1st**
   > ./pulsar-admin topics set-publish-rate `-b 10485760` persistent://public/default/topic-rate-test
   ./pulsar-admin topics get-publish-rate persistent://public/default/topic-rate-test
   {
      "publishThrottlingRateInMsg" : -1,
      "publishThrottlingRateInByte" : 10485760
    }
   
   **2nd**
   > ./pulsar-admin topics set-publish-rate `-m 1000` persistent://public/default/topic-rate-test
   ./pulsar-admin topics get-publish-rate persistent://public/default/topic-rate-test
   {
     "publishThrottlingRateInMsg" : 1000,
     "publishThrottlingRateInByte" : -1
   }
   
   The purpose of this PR is to combine the previous and current rate by adding an option `--reset-mode`, in this case, we will execute **2nd** as the result below.
   **2nd**
   > ./pulsar-admin topics set-publish-rate `-m 1000` --reset-mode false persistent://public/default/topic-rate-test
   ./pulsar-admin topics get-publish-rate persistent://public/default/topic-rate-test
   {
     "publishThrottlingRateInMsg" : 1000,
     "publishThrottlingRateInByte" : 10485760
   }
   
   ### Documentation  
   - 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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic setPublishRate/setDispatchRate policy

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


   @merlimat @ivankelly @massakam @codelipenghui @315157973 @BewareMyPower @hangc0276 PTAL, 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 commented on pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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


   @merlimat @lhotari @eolivelli @aahmed-se @k2la - PTAL, 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 commented on pull request #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic setPublishRate/setDispatchRate policy

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


   @merlimat @aahmed-se @ivankelly @k2la  @codelipenghui @315157973 @BewareMyPower @hangc0276 PTAL, 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 commented on pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic setPublishRate/setDispatchRate policy

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


   @merlimat @aahmed-se @ivankelly @k2la  @codelipenghui @315157973 @BewareMyPower @hangc0276 PTAL, 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 edited a comment on pull request #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   > @yuruguo I think we don't need to introduce the new flag, the `publishThrottlingRateInMsg` and `publishThrottlingRateInByte ` can be treated as a single unit, if users want to use an old value a part of it, they can get the policy first and then copy the old value for the new operation.
   
   There is no doubt that we can achieve the above effects according to your instructions, and [here](https://github.com/apache/pulsar/pull/12242#issue-745891911) is also used in this way.
   
   **However**, this is an unfriendly operation for users, and users generally do not have this operating habit. In actual use, I always thought that the previously option's(such as `publishThrottlingRateInMsg`)  value is still valid when I set other option(such as `publishThrottlingRateInByte`) , but this is not the case.
   
   **In addition**, the effect of kafka setting rate configuration is to cover and add, such as
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152'
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'consumer_byte_rate=2097152'
   ```
   above equals to
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152, consumer_byte_rate=2097152'
   ```
   We can also achieve this effect like kafka by adding `--reset-mode`, and this is a meaningful support for people who change from kafka users to pulsar users.
   
   **Finally**, the default value of `--reset-mode` is false, which is consistent with the previous behavior, unless the user explicitly specifies it.


-- 
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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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


   @merlimat @lhotari @aahmed-se @eolivelli @codelipenghui @BewareMyPower @hangc0276 - PTAL, 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 commented on pull request #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 edited a comment on pull request #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   > @yuruguo I think we don't need to introduce the new flag, the `publishThrottlingRateInMsg` and `publishThrottlingRateInByte ` can be treated as a single unit, if users want to use an old value a part of it, they can get the policy first and then copy the old value for the new operation.
   
   There is no doubt that we can achieve the above effects according to your instructions, and [here](https://github.com/apache/pulsar/pull/12242#issue-1011143271) is also used in this way.
   
   **However**, this is an unfriendly operation for users, and users generally do not have this operating habit. In actual use, I always thought that the previously option's(such as `publishThrottlingRateInMsg`)  value is still valid when I set other option(such as `publishThrottlingRateInByte`) , but this is not the case.
   
   **In addition**, the effect of kafka setting rate configuration is to cover and add, such as
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152'
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'consumer_byte_rate=2097152'
   ```
   above equals to
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152, consumer_byte_rate=2097152'
   ```
   We can also achieve this effect like kafka by adding `--update-mode`, and this is a meaningful support for people who change from kafka users to pulsar users.
   
   **Finally**, the default value of `--update-mode` is false, which is consistent with the previous behavior, unless the user explicitly specifies it.


-- 
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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -2370,23 +2370,27 @@ void setInactiveTopicPolicies(String topic
      * Set message-dispatch-rate (topic can dispatch this many messages per second).
      *
      * @param topic
+     * @param resetMode
+     *            clear the previous rate and reset (default true). if it is false, merge the two rate
      * @param dispatchRate
      *            number of messages per second
      * @throws PulsarAdminException
      *             Unexpected error
      */
-    void setDispatchRate(String topic, DispatchRate dispatchRate) throws PulsarAdminException;

Review comment:
       I see, thanks for your pointer :)
   Done, PTAL




-- 
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 pull request #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   @yuruguo I think we don't need to introduce the new flag, the `publishThrottlingRateInMsg` and `publishThrottlingRateInByte ` can be treated as a single unit, if users want to use an old value a part of it, they can get the policy first and then copy the old value for the new operation.


-- 
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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic setPublishRate/setDispatchRate policy

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


   @merlimat @ivankelly @massakam @codelipenghui @315157973 @BewareMyPower @hangc0276 PTAL, 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 edited a comment on pull request #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   > @yuruguo I think we don't need to introduce the new flag, the `publishThrottlingRateInMsg` and `publishThrottlingRateInByte ` can be treated as a single unit, if users want to use an old value a part of it, they can get the policy first and then copy the old value for the new operation.
   
   There is no doubt that we can achieve the above effects according to your instructions, and [here](https://github.com/apache/pulsar/pull/12242#issue-745891911) is also used in this way.
   
   **However**, this is an unfriendly operation for users, and users generally do not have this operating habit.
   
   **In addition**, the effect of kafka setting rate configuration is to cover and add, such as
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152'
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'consumer_byte_rate=2097152'
   ```
   above equals to
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152, consumer_byte_rate=2097152'
   ```
   We can also achieve this effect by adding `--reset-mode`, and this is a meaningful support for people who change from kafka users to pulsar users.


-- 
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 #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic setPublishRate/setDispatchRate policy

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


   @merlimat @ivankelly @massakam @codelipenghui @315157973 @BewareMyPower @hangc0276 PTAL, 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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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


   @merlimat @lhotari @aahmed-se @eolivelli @codelipenghui @BewareMyPower @hangc0276 - PTAL, 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 commented on a change in pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -2370,23 +2370,27 @@ void setInactiveTopicPolicies(String topic
      * Set message-dispatch-rate (topic can dispatch this many messages per second).
      *
      * @param topic
+     * @param resetMode
+     *            clear the previous rate and reset (default true). if it is false, merge the two rate
      * @param dispatchRate
      *            number of messages per second
      * @throws PulsarAdminException
      *             Unexpected error
      */
-    void setDispatchRate(String topic, DispatchRate dispatchRate) throws PulsarAdminException;

Review comment:
       I see, thanks for your pointer :)
   Done, PTAL




-- 
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 #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   > @yuruguo I think we don't need to introduce the new flag, the `publishThrottlingRateInMsg` and `publishThrottlingRateInByte ` can be treated as a single unit, if users want to use an old value a part of it, they can get the policy first and then copy the old value for the new operation.
   
   There is no doubt that we can achieve the above effects according to your instructions, and [here](https://github.com/apache/pulsar/pull/12242#issue-1011143271) is also used in this way.
   
   **However**, this is an unfriendly operation for users, and users generally do not have this operating habit.
   
   **In addition**, the effect of kafka setting topic configuration is to cover and add, such as
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152'
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'consumer_byte_rate=2097152'
   ```
   equal to
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152, consumer_byte_rate=2097152'
   ```
   We can also achieve this effect by adding `--reset-mode`, and this is a meaningful support for people who change from kafka users to pulsar users.


-- 
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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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] eolivelli commented on a change in pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -2370,23 +2370,27 @@ void setInactiveTopicPolicies(String topic
      * Set message-dispatch-rate (topic can dispatch this many messages per second).
      *
      * @param topic
+     * @param resetMode
+     *            clear the previous rate and reset (default true). if it is false, merge the two rate
      * @param dispatchRate
      *            number of messages per second
      * @throws PulsarAdminException
      *             Unexpected error
      */
-    void setDispatchRate(String topic, DispatchRate dispatchRate) throws PulsarAdminException;

Review comment:
       Pulsar Admin API is a public API that users can use from Java code.
   
   It is not only used by the pulsar-admim tool




-- 
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] eolivelli commented on a change in pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
##########
@@ -2662,7 +2662,7 @@ public void getDispatchRate(@Suspended final AsyncResponse asyncResponse,
     }
 
     @POST
-    @Path("/{tenant}/{namespace}/{topic}/dispatchRate")
+    @Path("/{tenant}/{namespace}/{topic}/{resetMode}/dispatchRate")

Review comment:
       This is a breaking API change.
   Can we use a query string parameter?

##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -2370,23 +2370,27 @@ void setInactiveTopicPolicies(String topic
      * Set message-dispatch-rate (topic can dispatch this many messages per second).
      *
      * @param topic
+     * @param resetMode
+     *            clear the previous rate and reset (default true). if it is false, merge the two rate
      * @param dispatchRate
      *            number of messages per second
      * @throws PulsarAdminException
      *             Unexpected error
      */
-    void setDispatchRate(String topic, DispatchRate dispatchRate) throws PulsarAdminException;

Review comment:
       Here and below we are introducing breaking API changes
   You can deprecate this method and add a new one




-- 
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 #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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] github-actions[bot] commented on pull request #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12242:
URL: https://github.com/apache/pulsar/pull/12242#issuecomment-1053791757


   The pr had no activity for 30 days, mark with Stale label.


-- 
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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 edited a comment on pull request #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   > @yuruguo I think we don't need to introduce the new flag, the `publishThrottlingRateInMsg` and `publishThrottlingRateInByte ` can be treated as a single unit, if users want to use an old value a part of it, they can get the policy first and then copy the old value for the new operation.
   
   There is no doubt that we can achieve the above effects according to your instructions, and [here](https://github.com/apache/pulsar/pull/12242#issue-745891911) is also used in this way.
   
   **However**, this is an unfriendly operation for users, and users generally do not have this operating habit.
   
   **In addition**, the effect of kafka setting rate configuration is to cover and add, such as
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152'
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'consumer_byte_rate=2097152'
   ```
   equal to
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152, consumer_byte_rate=2097152'
   ```
   We can also achieve this effect by adding `--reset-mode`, and this is a meaningful support for people who change from kafka users to pulsar users.


-- 
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 #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   /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 a change in pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic setPublishRate/setDispatchRate policy

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



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -2370,23 +2370,27 @@ void setInactiveTopicPolicies(String topic
      * Set message-dispatch-rate (topic can dispatch this many messages per second).
      *
      * @param topic
+     * @param resetMode
+     *            clear the previous rate and reset (default true). if it is false, merge the two rate
      * @param dispatchRate
      *            number of messages per second
      * @throws PulsarAdminException
      *             Unexpected error
      */
-    void setDispatchRate(String topic, DispatchRate dispatchRate) throws PulsarAdminException;

Review comment:
       I see, thanks for your pointer :)
   Done




-- 
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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -2370,23 +2370,27 @@ void setInactiveTopicPolicies(String topic
      * Set message-dispatch-rate (topic can dispatch this many messages per second).
      *
      * @param topic
+     * @param resetMode
+     *            clear the previous rate and reset (default true). if it is false, merge the two rate
      * @param dispatchRate
      *            number of messages per second
      * @throws PulsarAdminException
      *             Unexpected error
      */
-    void setDispatchRate(String topic, DispatchRate dispatchRate) throws PulsarAdminException;

Review comment:
       I see, thanks for your pointer :)
   Done




-- 
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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
##########
@@ -2662,7 +2662,7 @@ public void getDispatchRate(@Suspended final AsyncResponse asyncResponse,
     }
 
     @POST
-    @Path("/{tenant}/{namespace}/{topic}/dispatchRate")
+    @Path("/{tenant}/{namespace}/{topic}/{resetMode}/dispatchRate")

Review comment:
       Good suggestion :)
   Done




-- 
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 #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   /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 edited a comment on pull request #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   > @yuruguo I think we don't need to introduce the new flag, the `publishThrottlingRateInMsg` and `publishThrottlingRateInByte ` can be treated as a single unit, if users want to use an old value a part of it, they can get the policy first and then copy the old value for the new operation.
   
   There is no doubt that we can achieve the above effects according to your instructions, and [here](https://github.com/apache/pulsar/pull/12242#issue-1011143271) is also used in this way.
   
   **However**, this is an unfriendly operation for users, and users generally do not have this operating habit. In actual use, I always thought that the previously option's(such as `publishThrottlingRateInMsg`)  value is still valid when I set other option(such as `publishThrottlingRateInByte`) , but this is not the case.
   
   **In addition**, the effect of kafka setting rate configuration is to cover and add, such as
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152'
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'consumer_byte_rate=2097152'
   ```
   above equals to
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152, consumer_byte_rate=2097152'
   ```
   We can also achieve this effect like kafka by adding `--reset-mode`, and this is a meaningful support for people who change from kafka users to pulsar users.
   
   **Finally**, the default value of `--reset-mode` is false, which is consistent with the previous behavior, unless the user explicitly specifies it.


-- 
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 #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 a change in pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic setPublishRate/setDispatchRate policy

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



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -2370,23 +2370,27 @@ void setInactiveTopicPolicies(String topic
      * Set message-dispatch-rate (topic can dispatch this many messages per second).
      *
      * @param topic
+     * @param resetMode
+     *            clear the previous rate and reset (default true). if it is false, merge the two rate
      * @param dispatchRate
      *            number of messages per second
      * @throws PulsarAdminException
      *             Unexpected error
      */
-    void setDispatchRate(String topic, DispatchRate dispatchRate) throws PulsarAdminException;

Review comment:
       I see, thanks for your pointer :)
   Done, PTAL




-- 
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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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


   @merlimat @lhotari @eolivelli @aahmed-se @codelipenghui @BewareMyPower @hangc0276 @gaoran10 - PTAL, 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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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


   @merlimat @lhotari @eolivelli @aahmed-se @k2la - PTAL, 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 commented on pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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


   @merlimat @lhotari @eolivelli @aahmed-se @codelipenghui @BewareMyPower @hangc0276 @gaoran10 - PTAL, 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 commented on a change in pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -2370,23 +2370,27 @@ void setInactiveTopicPolicies(String topic
      * Set message-dispatch-rate (topic can dispatch this many messages per second).
      *
      * @param topic
+     * @param resetMode
+     *            clear the previous rate and reset (default true). if it is false, merge the two rate
      * @param dispatchRate
      *            number of messages per second
      * @throws PulsarAdminException
      *             Unexpected error
      */
-    void setDispatchRate(String topic, DispatchRate dispatchRate) throws PulsarAdminException;

Review comment:
       The method `setDispatchRate(String topic, DispatchRate dispatchRate)` will not be used anywhere after introducing new option `--reset-mode`, and its implementation will also change in order to adapt to the new option, so I think it could be possible to directly replace it with `setDispatchRate(String topic, boolean resetMode, DispatchRate dispatchRate)`. Maybe we can ask other people's ideas?




-- 
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 #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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


   @merlimat @lhotari @aahmed-se @eolivelli @codelipenghui @BewareMyPower @hangc0276 - PTAL, 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 commented on pull request #12242: [pulsar-admin] Add option --reset-mode to optimize topic rate policy

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






-- 
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 #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 #12242: [pulsar-admin] Add --update-mode to optimize topic rate policy

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


   /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 edited a comment on pull request #12242: [pulsar-admin] Add --reset-mode to optimize topic rate policy

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


   > @yuruguo I think we don't need to introduce the new flag, the `publishThrottlingRateInMsg` and `publishThrottlingRateInByte ` can be treated as a single unit, if users want to use an old value a part of it, they can get the policy first and then copy the old value for the new operation.
   
   There is no doubt that we can achieve the above effects according to your instructions, and [here](https://github.com/apache/pulsar/pull/12242#issue-745891911) is also used in this way.
   
   **However**, this is an unfriendly operation for users, and users generally do not have this operating habit.
   
   **In addition**, the effect of kafka setting topic configuration is to cover and add, such as
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152'
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'consumer_byte_rate=2097152'
   ```
   equal to
   ```
   bin/kafka-configs.sh --zookeeper localhost:2181/kafka --alter --entity-type clients --entity-default  --add-config 'producer_byte_rate=2097152, consumer_byte_rate=2097152'
   ```
   We can also achieve this effect by adding `--reset-mode`, and this is a meaningful support for people who change from kafka users to pulsar users.


-- 
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 #12242: [pulsar-admin] Add option --reset-mode to optimize topic setPublishRate/setDispatchRate policy

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


   @merlimat @ivankelly @massakam @codelipenghui @315157973 @BewareMyPower @hangc0276 PTAL, 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