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/13 08:59:38 UTC

[GitHub] [pulsar] leizhiyuan opened a new pull request, #15156: fix: wrong autoReadDisabledRateLimiting status when limit by maxPendingSendRequests

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

   Fixes #15149 
   
   *(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)*
   
   Master Issue: #15149 
   
   ### Motivation
   
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   set autoReadDisabledRateLimiting true
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### 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): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
     
   - [ ] `no-need-doc` 
   (Please explain why)
     
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-added`
   (Docs have been already added)


-- 
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] Jason918 commented on a diff in pull request #15156: fix: wrong autoReadDisabledRateLimiting status when limit by maxPendingSendRequests

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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -2647,7 +2647,7 @@ public void startSendOperation(Producer producer, int msgSize, int numMessages)
             // client connection, possibly shared between multiple producers
             ctx.channel().config().setAutoRead(false);
             recordRateLimitMetrics(producers);
-            autoReadDisabledRateLimiting = isPublishRateExceeded;
+            autoReadDisabledRateLimiting = true;

Review Comment:
   This change does not follow the original design of `autoReadDisabledRateLimiting`.
   Can you provide more info about the effect when `pendingSendRequest == maxPendingSendRequests` and `autoReadDisabledRateLimiting` is false.



-- 
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] leizhiyuan commented on a diff in pull request #15156: fix: wrong autoReadDisabledRateLimiting status when limit by maxPendingSendRequests

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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -2647,7 +2647,7 @@ public void startSendOperation(Producer producer, int msgSize, int numMessages)
             // client connection, possibly shared between multiple producers
             ctx.channel().config().setAutoRead(false);
             recordRateLimitMetrics(producers);
-            autoReadDisabledRateLimiting = isPublishRateExceeded;
+            autoReadDisabledRateLimiting = true;

Review Comment:
   ok,maybe I misunderstand the design



-- 
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 #15156: fix: wrong autoReadDisabledRateLimiting status when limit by maxPendingSendRequests

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

   @leizhiyuan:Thanks for providing doc info!


-- 
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] poorbarcode commented on pull request #15156: fix: wrong autoReadDisabledRateLimiting status when limit by maxPendingSendRequests

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

   Hi @leizhiyuan I think `ServerCnx.autoReadDisabledRateLimiting` is for `broker or Netty-Thread`, not for `serverCnx`.  useful for that "When used to remove producer limiting, try to remove netty-thread limiting ( it will success when broker was not rate-limiting)". see: 
   
   https://github.com/apache/pulsar/blob/732049fc6ca1beb046deb43057be2b130736fbca/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L2712-L2718
   
   So I think this will break the original design.
   
   We can have a friendly discussion. 


-- 
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] leizhiyuan closed pull request #15156: fix: wrong autoReadDisabledRateLimiting status when limit by maxPendingSendRequests

Posted by GitBox <gi...@apache.org>.
leizhiyuan closed pull request #15156: fix: wrong autoReadDisabledRateLimiting status when limit by maxPendingSendRequests
URL: https://github.com/apache/pulsar/pull/15156


-- 
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 #15156: fix: wrong autoReadDisabledRateLimiting status when limit by maxPendingSendRequests

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

   @leizhiyuan:Thanks for your contribution. For this PR, do we need to update docs?
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)


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