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 01:12:45 UTC
[GitHub] merlimat commented on a change in pull request #791: Correctly process the ack for a message that was outstanding on a dif?
merlimat commented on a change in pull request #791: Correctly process the ack for a message that was outstanding on a dif?
URL: https://github.com/apache/incubator-pulsar/pull/791#discussion_r140937359
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
##########
@@ -517,24 +516,24 @@ public void addUnAckedMessages(int numberOfMessages) {
}
public boolean isBlockedDispatcherOnUnackedMsgs() {
- return BLOCKED_DISPATCHER_ON_UNACKMSG_UPDATER.get(this) == TRUE;
+ return blockedDispatcherOnUnackedMsgs == TRUE;
}
-
+
public void blockDispatcherOnUnackedMsgs() {
- BLOCKED_DISPATCHER_ON_UNACKMSG_UPDATER.set(this, TRUE);
+ blockedDispatcherOnUnackedMsgs = TRUE;
Review comment:
Same as for get, updated is not needed. We only need updated (or Atomic) for compareAndSet or increment operations
----------------------------------------------------------------
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