Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1602#discussion_r145974574
  
    --- Diff: 
artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java
 ---
    @@ -34,6 +34,25 @@
     import org.apache.activemq.artemis.journal.ActiveMQJournalLogger;
     
     public final class TimedBuffer {
    +
    +   /**
    +    * Property name to set the percentage of error allowed while expiring 
the flush {@code timeout} to happen:
    +    * it can assume any positive value from {@code 0} to {@link 
Integer#MAX_VALUE}.
    +    * <p>
    +    * By default it is {@link #DEFAULT_TIMEOUT_ERROR_PERCENTAGE} more than 
the configured {@code timeout}.
    +    */
    +   public static final String JOURNAL_TIMEOUT_ERROR_PROPERTY_NAME = 
"journal.timeout.error";
    +   public static final int DEFAULT_TIMEOUT_ERROR_PERCENTAGE = 50;
    +   private static final double MAX_TIMEOUT_ERROR;
    +
    +   static {
    +      final int errorPercentage = 
Integer.getInteger(JOURNAL_TIMEOUT_ERROR_PROPERTY_NAME, 
DEFAULT_TIMEOUT_ERROR_PERCENTAGE);
    +      if (errorPercentage < 0) {
    +         throw new RuntimeException("The sleep error percentage must be >= 
0");
    +      }
    +      MAX_TIMEOUT_ERROR = 1 + (errorPercentage / 100);
    --- End diff --
    
    @franz1981 ok, what is the point of this PR? to have a parameterized 
parameter to tweak about? 
    
    I don't want that kind of property open... users can do weird things and 
then we have to support it.. so.. keep it a constant here.... this is about 
making sure sleep is working or not.
    
    
    on which case, the semantic will be same as before.. so I'm not 
understanding what is the point of the change?


---

Reply via email to