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/05/14 06:35:18 UTC

[GitHub] [pulsar] AnonHxy opened a new pull request, #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   ### Motivation
   
   Synchronized update `topicPublishRateLimiter` in case of race condtion.  
   There is a race condtion when two threads update `topicPublishRateLimiter` concurrency:
   * `topicPublishRateLimiter` is null at the beginning
   * Thread1 update it with both `publishThrottlingRateInByte < 0` and `publishThrottlingRateInMsg < 0`
   * Then thread1 stop at https://github.com/apache/pulsar/blob/7bdfa3a3e5e71c44a174b28d0a843fb6730865fa/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java#L1170
   * Thread2 update it with `publishThrottlingRateInByte > 0` or `publishThrottlingRateInMsg > 0`
   * And thread2 will set `topicPublishRateLimiter` a new limiter.
   * Then Thread1 resume, and  set  it  to `PublishRateLimiter.DISABLED_RATE_LIMITER`. Then the new limiter setted by thread2 will never be accessed, which will produce resource leakages
   
   
   
   ### Modifications
   
   Synchronized  method `updatePublishDispatcher`
   
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   
   ### 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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   @Technoboy-  @Jason918 @HQebupt  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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] Jason918 merged pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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


-- 
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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   @gaozhangmin  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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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] AnonHxy commented on pull request #15599: [fix][broker]Sync topicPublishRateLimiter update

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

   /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