-
Notifications
You must be signed in to change notification settings - Fork 906
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
validate diskUsageThreshold and diskUsageLwmThreshold #3285
Conversation
rerun failure checks |
1 similar comment
rerun failure checks |
@dlg99 @eolivelli @zymap @shoothzj Can you help take a look at this pr? Thanks. |
PTAL @zymap Thanks. |
rerun failure checks |
Merge master to trigger CI test flaky test again. |
@hangc0276 There are two frequent flaky tests: #3206 #2665. Another flaky test seems to be related to the timeout of the bookie service shutdown, which has nothing to do with this PR, we can analyze and solve this flaky test in another PR. Flakes:
Warning: org.apache.bookkeeper.bookie.StateManagerTest.testReadOnlyBookieTransitions
Error: Run 1: StateManagerTest.testReadOnlyBookieTransitions:173->Object.wait:-2 » TestTimedOut |
rerun failure checks |
8 similar comments
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
rerun failure checks |
@@ -229,5 +231,18 @@ private void checkDirs(final LedgerDirsManager ldm) | |||
} | |||
ldm.getWritableLedgerDirs(); | |||
} | |||
|
|||
@VisibleForTesting | |||
void setDiskSpaceThreshold(float diskSpaceThreshold, float diskUsageLwmThreshold) { |
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.
do we really need this method? can we instantiate a LedgerDirsMonitor to run tests?
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.
Make sense to me. I have addressed your comments. PTAL.
rerun failure checks |
2 similar comments
rerun failure checks |
rerun failure checks |
### Motivation When `diskUsageThreshold < diskUsageLwmThreshold`, the bookie can be started normally. When the disk usage reaches `diskUsageThreshold` , bookie will automatically switch to `ReadOnly` mode. The `LedgerDirsMonitor` then switches the bookie back to `read-write` mode since the disk usage is less than `diskUsageLwmThreshold`, the bookie will switch state back and forth frequently. ### Changes When creating `LedgerDirsMonitor`, we need to validate `diskUsageThreshold` and `diskUsageLwmThreshold` first. (cherry picked from commit f181325)
### Motivation When `diskUsageThreshold < diskUsageLwmThreshold`, the bookie can be started normally. When the disk usage reaches `diskUsageThreshold` , bookie will automatically switch to `ReadOnly` mode. The `LedgerDirsMonitor` then switches the bookie back to `read-write` mode since the disk usage is less than `diskUsageLwmThreshold`, the bookie will switch state back and forth frequently. ### Changes When creating `LedgerDirsMonitor`, we need to validate `diskUsageThreshold` and `diskUsageLwmThreshold` first.
Motivation
When
diskUsageThreshold < diskUsageLwmThreshold
, the bookie can be started normally. When the disk usage reachesdiskUsageThreshold
, bookie will automatically switch toReadOnly
mode. TheLedgerDirsMonitor
then switches the bookie back toread-write
mode since the disk usage is less thandiskUsageLwmThreshold
, the bookie will switch state back and forth frequently.Changes
When creating
LedgerDirsMonitor
, we need to validatediskUsageThreshold
anddiskUsageLwmThreshold
first.