This is an automated email from the ASF dual-hosted git repository.

xiangying pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 07055477e76dc5efa174ae385488f1c077c4f97e
Author: Matteo Merli <[email protected]>
AuthorDate: Sat Oct 1 08:06:13 2022 -0700

    Allow to configure and disable the size of lookahead for detecting fixed 
delays in messages (#17907)
    
    (cherry picked from commit 55826742d1c589d106d7cbe97f12ec2e8bcca35f)
---
 conf/broker.conf                                                    | 6 ++++++
 .../main/java/org/apache/pulsar/broker/ServiceConfiguration.java    | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/conf/broker.conf b/conf/broker.conf
index f9cdba25a32..c89414c8afd 100644
--- a/conf/broker.conf
+++ b/conf/broker.conf
@@ -533,6 +533,12 @@ isDelayedDeliveryDeliverAtTimeStrict=false
 # fixed delays in messages in a different way.
 delayedDeliveryFixedDelayDetectionLookahead=50000
 
+# Size of the lookahead window to use when detecting if all the messages in 
the topic
+# have a fixed delay.
+# Default is 50,000. Setting the lookahead window to 0 will disable the logic 
to handle
+# fixed delays in messages in a different way.
+delayedDeliveryFixedDelayDetectionLookahead=50000
+
 # Whether to enable acknowledge of batch local index.
 acknowledgmentAtBatchIndexLevelEnabled=false
 
diff --git 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
index 05a24166c88..7a770b4b85f 100644
--- 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
+++ 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
@@ -331,6 +331,12 @@ public class ServiceConfiguration implements 
PulsarConfiguration {
             + "logic to handle fixed delays in messages in a different way.")
     private long delayedDeliveryFixedDelayDetectionLookahead = 50_000;
 
+    @FieldContext(category = CATEGORY_SERVER, doc = "Size of the lookahead 
window to use "
+            + "when detecting if all the messages in the topic have a fixed 
delay. "
+            + "Default is 50,000. Setting the lookahead window to 0 will 
disable the "
+            + "logic to handle fixed delays in messages in a different way.")
+    private long delayedDeliveryFixedDelayDetectionLookahead = 50_000;
+
     @FieldContext(category = CATEGORY_SERVER, doc = "Whether to enable the 
acknowledge of batch local index")
     private boolean acknowledgmentAtBatchIndexLevelEnabled = false;
 

Reply via email to