You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by gi...@git.apache.org on 2017/09/26 00:55:36 UTC

[GitHub] merlimat commented on issue #791: Correctly process the ack for a message that was outstanding on a dif?

merlimat commented on issue #791: Correctly process the ack for a message that was outstanding on a dif?
URL: https://github.com/apache/incubator-pulsar/pull/791#issuecomment-332054536
 
 
   Mostly readability, there is no need to use updater trick to get value of a
   volatile variable
   On Mon, Sep 25, 2017 at 8:46 PM Rajan Dhabalia <no...@github.com>
   wrote:
   
   > *@rdhabalia* commented on this pull request.
   > ------------------------------
   >
   > In
   > pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java
   > <https://github.com/apache/incubator-pulsar/pull/791#discussion_r140934422>
   > :
   >
   > > @@ -354,7 +354,7 @@ void flowPermits(int additionalNumberOfMessages) {
   >          checkArgument(additionalNumberOfMessages > 0);
   >
   >          // block shared consumer when unacked-messages reaches limit
   > -        if (shouldBlockConsumerOnUnackMsgs() && UNACKED_MESSAGES_UPDATER.get(this) >= maxUnackedMessages) {
   > +        if (shouldBlockConsumerOnUnackMsgs() && unackedMessages >= maxUnackedMessages) {
   >
   > what is the reason for replacing UNACKED_MESSAGES_UPDATER.get(this) with
   > unackedMessages?
   >
   > ?
   > You are receiving this because you were assigned.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/incubator-pulsar/pull/791#pullrequestreview-65075870>,
   > or mute the thread
   > <https://github.com/notifications/unsubscribe-auth/AAD0JPK4sYCagwRJn7TrDJAHvTeCA_AIks5smElvgaJpZM4Pjg-v>
   > .
   >
   -- 
   Matteo Merli
   <mm...@apache.org>
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services