-
Notifications
You must be signed in to change notification settings - Fork 895
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
Fix the infinite waiting for shutdown due to throttler limit #2942
Conversation
@eolivelli @merlimat @codelipenghui Can you take a look at this pr. Thanks. |
@wenbingshen Thanks for you enormous contribution. bookkeeper/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java Lines 558 to 579 in 7385d90
So, it will wait for one entry log file compact complete before GarbageCollectorThread shutdown. If we throttle the compaction in low throughput, it will take multi minutes to compaction 2GB entry log file. IMO, we'd better introduce a new compact flag for |
@hangc0276 Gotcha! Thanks for your review. I will implement it soon. :) |
54642f8
to
22af4aa
Compare
rerun failure checks |
2 similar comments
rerun failure checks |
rerun failure checks |
rerun failure checks |
@hangc0276 PTAL, thanks. :) |
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.
LGTM
ping @eolivelli PTAL, Thanks. |
@eolivelli PTAL Thanks |
@pkumar-singh It's been a long time. Can you take a look at this pr? Thanks. |
@eolivelli It's been over 3 months since this PR was created. Can you help take a look at this PR? Thanks very much! |
@wenbingshen Would you please rebase the master? thanks. |
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.
Good job!
https://github.com/apache/bookkeeper/runs/7519602108?check_suite_focus=true |
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
Show resolved
Hide resolved
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/AbstractLogCompactor.java
Outdated
Show resolved
Hide resolved
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/AbstractLogCompactor.java
Outdated
Show resolved
Hide resolved
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/AbstractLogCompactor.java
Show resolved
Hide resolved
Descriptions of the changes in this PR: If the compactor is limited, the shutdown priority should be higher than waiting for RateLimiter.acquire. According to @hangc0276 suggestion, when processing the shutdown logic of `GarbageCollectorThread`, we should check the status of the `newScanner.process` method. If the status is false, throw an `IOException` and stop compact immediately. Master Issue: #2941 (cherry picked from commit 442e3bb)
…2942) Descriptions of the changes in this PR: ### Motivation If the compactor is limited, the shutdown priority should be higher than waiting for RateLimiter.acquire. ### Changes According to @hangc0276 suggestion, when processing the shutdown logic of `GarbageCollectorThread`, we should check the status of the `newScanner.process` method. If the status is false, throw an `IOException` and stop compact immediately. Master Issue: apache#2941
Descriptions of the changes in this PR:
Motivation
If the compactor is limited, the shutdown priority should be higher than waiting for RateLimiter.acquire.
Changes
According to @hangc0276 suggestion, when processing the shutdown logic of
GarbageCollectorThread
, we should check the status of thenewScanner.process
method. If the status is false, throw anIOException
and stop compact immediately.Master Issue: #2941