akashchamp opened a new pull request, #2806:
URL: https://github.com/apache/uniffle/pull/2806

   ### What changes were proposed in this pull request?
   
   Add a `local_storage_is_healthy` gauge labelled by `local_disk_path`, next 
to the existing per-disk `local_storage_is_writable` and 
`local_storage_is_timeout` gauges. `LocalStorageChecker` sets it on every check:
   
   - the read/write check fails (dir marked corrupted): 1
   - the space check (`checkIsSpaceEnough`) fails: 1, otherwise 0
   - the check times out: 1
   
   I kept the same convention as the server-level `is_healthy` gauge and 
`local_storage_is_writable`, where 0 means OK and 1 means unhealthy, so the two 
health metrics read the same way on a dashboard. Happy to flip it if you'd 
rather have 1 = healthy for the new one.
   
   ### Why are the changes needed?
   
   Right now you can only see the corrupted-dir count and whole-server health, 
not which disk went unhealthy because of usage or a failed read/write check.
   
   Fix: #1451
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, one new shuffle server metric: 
`local_storage_is_healthy{local_disk_path=...}`.
   
   ### How was this patch tested?
   
   Added assertions to `StorageCheckerTest` (per-disk value changes as each 
mocked disk crosses the usage threshold) and `LocalStorageCheckerTest` (timeout 
case, plus a new corrupted-storage case). Without the `LocalStorageChecker` 
change these fail with `expected: <1.0> but was: <0.0>`.
   
   ```
   ./mvnw -pl server -am com.diffplug.spotless:spotless-maven-plugin:check 
checkstyle:check test \
     
-Dtest="LocalStorageCheckerTest,StorageCheckerTest,ShuffleServerMetricsTest" \
     -Dsurefire.failIfNoSpecifiedTests=false
   ```
   11 tests pass, spotless and checkstyle clean (JDK 17).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to