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/06/04 23:22:19 UTC

[GitHub] [pulsar] michaeljmarshall edited a comment on pull request #10831: [Broker] Fix possible data race in getFirstAvailableConsumerPermits

michaeljmarshall edited a comment on pull request #10831:
URL: https://github.com/apache/pulsar/pull/10831#issuecomment-855101337


   @lhotari - in order to call `get` on the atomic wrapper just once, what if we added a new method that returns an `Optional<Integer>` that is a combination of the `isConsumerAvailable` and the `getAvailablePermits` methods? It would introduce additional overhead for the new objects, so perhaps it's an unnecessary change. Do you have a preference?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org