Closed justinlin-linkedin closed 6 months ago
Attention: Patch coverage is 81.25000%
with 3 lines
in your changes are missing coverage. Please review.
Project coverage is 70.27%. Comparing base (
52ba813
) to head (6fa44b7
). Report is 9 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
...in/java/com/github/ambry/store/StorageManager.java | 81.25% | 1 Missing and 2 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary
When storage manager starts, we would check if there are too many unavailable disks. If so, StorageManager would throw an exception to fail the initialization. In this PR, we are bringing the same logic to DiskFailureHandler.
Reasons for change
Disks could fail at any given time. If all disks fail at runtime, StorageManager would be able to successfully start up without any exception. However, when disk failure handler is running, it would move all the replicas out. Why do we want to terminate JVM when this happens? The reason is that we want to kill the JVM this host would become unavailable from our tools. It would be much easier to use our tools for find unavailable hosts.
Changes
Using
System.exit(1)
to terminate JVM in disk failure handler when the number of failed disks reaches the threshold for termination.Test
No tests.