You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by zh...@apache.org on 2023/10/31 13:52:54 UTC
(incubator-celeborn) branch main updated: [CELEBORN-1103][BUG] only clean up expire data for good disks
This is an automated email from the ASF dual-hosted git repository.
zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 232a44b9e [CELEBORN-1103][BUG] only clean up expire data for good disks
232a44b9e is described below
commit 232a44b9ea78ef74f9b3ac535e6e61401b8667b9
Author: qinrui <qr...@gmail.com>
AuthorDate: Tue Oct 31 21:52:46 2023 +0800
[CELEBORN-1103][BUG] only clean up expire data for good disks
### What changes were proposed in this pull request?
**When a bad disk occurs, cleaning up expired shuffle keys can cause NullPointerException appearing in the thread pool obtained from `diskOperators` in `StorageManager`.
Therefore, only cleaning up expired shuffle keys from good disks will not cause the above problems.**
https://issues.apache.org/jira/browse/CELEBORN-1103
### Why are the changes needed?
bugfix
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
Closes #2060 from suizhe007/CELEBORN-1103.
Lead-authored-by: qinrui <qr...@gmail.com>
Co-authored-by: qinrui <51...@users.noreply.github.com>
Signed-off-by: zky.zhoukeyong <zk...@alibaba-inc.com>
---
.../celeborn/service/deploy/worker/storage/StorageManager.scala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala
index 56c82d02d..28ee0407a 100644
--- a/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala
+++ b/worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala
@@ -560,7 +560,9 @@ final private[worker] class StorageManager(conf: CelebornConf, workerSource: Abs
}
}
val (appId, shuffleId) = Utils.splitShuffleKey(shuffleKey)
- disksSnapshot().filter(_.status != DiskStatus.IO_HANG).foreach { diskInfo =>
+ disksSnapshot().filter(diskInfo =>
+ diskInfo.status == DiskStatus.HEALTHY
+ || diskInfo.status == DiskStatus.HIGH_DISK_USAGE).foreach { diskInfo =>
diskInfo.dirs.foreach { dir =>
val file = new File(dir, s"$appId/$shuffleId")
deleteDirectory(file, diskOperators.get(diskInfo.mountPoint))
@@ -606,7 +608,9 @@ final private[worker] class StorageManager(conf: CelebornConf, workerSource: Abs
private def cleanupExpiredAppDirs(expireDuration: Long): Unit = {
val diskInfoAndAppDirs = disksSnapshot()
- .filter(_.status != DiskStatus.IO_HANG)
+ .filter(diskInfo =>
+ diskInfo.status == DiskStatus.HEALTHY
+ || diskInfo.status == DiskStatus.HIGH_DISK_USAGE)
.map { case diskInfo =>
(diskInfo, diskInfo.dirs.filter(_.exists).flatMap(_.listFiles()))
}