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/11/29 18:57:26 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #12874: [broker] Optimize blocking backlogQuotaCheck to non-blocking in ServerCnx#handleProducer

merlimat commented on a change in pull request #12874:
URL: https://github.com/apache/pulsar/pull/12874#discussion_r758649825



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
##########
@@ -2518,17 +2528,26 @@ public boolean isSizeBacklogExceeded() {
      * @return determine if backlog quota enforcement needs to be done for topic based on time limit
      */
     public boolean isTimeBacklogExceeded() {
+        try {
+            return checkTimeBacklogExceeded().get();
+        } catch (Throwable e) {

Review comment:
       The main problem with this approach is that it completely hides from the caller the fact that the method is internally blocking. We have many other examples of this in the code base




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