This is an automated email from the ASF dual-hosted git repository.
mmarshall pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.8 by this push:
new dfec6b4 Fix IllegalArgumentException: Invalid period 0.0 to calculate
rate
dfec6b4 is described below
commit dfec6b4904549c2ed2efe6bbf7c10adb33395065
Author: chenlin <[email protected]>
AuthorDate: Tue Feb 15 18:34:10 2022 +0800
Fix IllegalArgumentException: Invalid period 0.0 to calculate rate
(cherry picked from commit c331281bc021c43c7911fe8316931a123541d0cf)
---
.../org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java
b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java
index 93ea624..225204a 100644
---
a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java
+++
b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java
@@ -177,7 +177,7 @@ public class ManagedLedgerFactoryImpl implements
ManagedLedgerFactory {
this.config = config;
this.mbean = new ManagedLedgerFactoryMBeanImpl(this);
this.entryCacheManager = new EntryCacheManager(this);
- this.statsTask =
scheduledExecutor.scheduleAtFixedRate(catchingAndLoggingThrowables(this::refreshStats),
+ this.statsTask =
scheduledExecutor.scheduleWithFixedDelay(catchingAndLoggingThrowables(this::refreshStats),
0, StatsPeriodSeconds, TimeUnit.SECONDS);
this.flushCursorsTask =
scheduledExecutor.scheduleAtFixedRate(catchingAndLoggingThrowables(this::flushCursors),
config.getCursorPositionFlushSeconds(),
config.getCursorPositionFlushSeconds(), TimeUnit.SECONDS);