zuston commented on code in PR #1744:
URL:
https://github.com/apache/incubator-uniffle/pull/1744#discussion_r1619765912
##########
server/src/main/java/org/apache/uniffle/server/LocalStorageChecker.java:
##########
@@ -100,38 +100,44 @@ public boolean checkIsHealthy() {
Map<StorageInfo, CompletableFuture<Void>> futureMap = new HashMap<>();
for (StorageInfo storageInfo : storageInfos) {
CompletableFuture<Void> storageCheckFuture =
- CompletableFuture.supplyAsync(
- () -> {
- if (!storageInfo.checkStorageReadAndWrite()) {
- storageInfo.markCorrupted();
- corruptedDirs.incrementAndGet();
- return null;
- }
-
- long total = getTotalSpace(storageInfo.storageDir);
- long availableBytes = getFreeSpace(storageInfo.storageDir);
-
- totalSpace.addAndGet(total);
- wholeDiskUsedSpace.addAndGet(total - availableBytes);
- long usedBytes = getServiceUsedSpace(storageInfo.storageDir);
- serviceUsedSpace.addAndGet(usedBytes);
- storageInfo.updateServiceUsedBytes(usedBytes);
- storageInfo.updateStorageFreeSpace(availableBytes);
-
- boolean isWritable = storageInfo.canWrite();
- ShuffleServerMetrics.gaugeLocalStorageIsWritable
- .labels(storageInfo.storage.getBasePath())
- .set(isWritable ? 0 : 1);
- ShuffleServerMetrics.gaugeLocalStorageIsTimeout
- .labels(storageInfo.storage.getBasePath())
- .set(0);
-
- if (storageInfo.checkIsSpaceEnough(total, availableBytes)) {
- num.incrementAndGet();
- }
- return null;
- },
- workers);
+ CompletableFuture.runAsync(
Review Comment:
This should not be covered, because it is wrapped by the
`CompletableFutureExtension`, and then exception will be thrown
--
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]