New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug fix: IllegalArgumentException: Invalid period 0.0 to calculate rate #14280
Merged
codelipenghui
merged 1 commit into
apache:master
from
lordcheng10:fix_bug_Invalid_Period
Feb 15, 2022
Merged
bug fix: IllegalArgumentException: Invalid period 0.0 to calculate rate #14280
codelipenghui
merged 1 commit into
apache:master
from
lordcheng10:fix_bug_Invalid_Period
Feb 15, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lordcheng10
changed the title
use scheduleWithFixedDelay replace scheduleAtFixedRate in the class of ManagedLedgerFactoryImpl
bug fix: IllegalArgumentException: Invalid period 0.0 to calculate rate
Feb 14, 2022
@codelipenghui @michaeljmarshall |
codelipenghui
approved these changes
Feb 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
@michaeljmarshall |
shoothzj
approved these changes
Feb 15, 2022
aloyszhang
approved these changes
Feb 15, 2022
eolivelli
approved these changes
Feb 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
+1 |
codelipenghui
added
release/2.9.2
cherry-picked/branch-2.9
Archived: 2.9 is end of life
and removed
release/2.9.3
labels
Feb 16, 2022
michaeljmarshall
added
release/2.8.3
cherry-picked/branch-2.8
Archived: 2.8 is end of life
and removed
release/2.8.4
labels
Feb 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/broker
cherry-picked/branch-2.8
Archived: 2.8 is end of life
cherry-picked/branch-2.9
Archived: 2.9 is end of life
doc-not-needed
Your PR changes do not impact docs
release/2.8.3
release/2.9.2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
use scheduleWithFixedDelay replace scheduleAtFixedRate in the class of ManagedLedgerFactoryImpl.
Because an exception was found in the broker log:
11:37:52.455 [bookkeeper-ml-scheduler-OrderedScheduler-24-0] ERROR org.apache.bookkeeper.common.util.SafeRunnable - Unexpected throwable caught
java.lang.IllegalArgumentException: Invalid period 0.0 to calculate rate
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:217) ~[com.google.guava-guava-30.1-jre.jar:?]
at org.apache.pulsar.common.stats.Rate.calculateRate(Rate.java:64) ~[org.apache.pulsar-pulsar-common-2.8.1.2.jar:2.8.1.2]
at org.apache.bookkeeper.mledger.impl.ManagedLedgerMBeanImpl.refreshStats(ManagedLedgerMBeanImpl.java:66) ~[org.apache.pulsar-managed-ledger-2.8.1.2.jar:2.8.1.2]
at org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl.lambda$refreshStats$3(ManagedLedgerFactoryImpl.java:227) ~[org.apache.pulsar-managed-ledger-2.8.1.2.jar:2.8.1.2]
at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707) ~[?:1.8.0_144]
at org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl.refreshStats(ManagedLedgerFactoryImpl.java:223) ~[org.apache.pulsar-managed-ledger-2.8.1.2.jar:2.8.1.2]
at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [org.apache.bookkeeper-bookkeeper-common-4.14.2.jar:4.14.2]
at org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203) [org.apache.bookkeeper-bookkeeper-common-4.14.2.jar:4.14.2]
at org.apache.bookkeeper.common.util.OrderedExecutor$TimedRunnable.run(OrderedExecutor.java:203) [org.apache.bookkeeper-bookkeeper-common-4.14.2.jar:4.14.2]
at com.google.common.util.concurrent.MoreExecutors$ScheduledListeningDecorator$NeverSuccessfulListenableFutureTask.run(MoreExecutors.java:705) [com.google.guava-guava-30.1-jre.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_144]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.66.Final.jar:4.1.66.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Documentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
(Please explain why)
doc
(If this PR contains doc changes)