From 15d1463be8ab60deb170fc4e3e112b4a3ee0ec29 Mon Sep 17 00:00:00 2001 From: sychen Date: Tue, 22 Oct 2024 10:19:31 +0800 Subject: [PATCH] [CELEBORN-1661] Make sure that the sortedFilesDb is initialized successfully when worker enable graceful shutdown ### What changes were proposed in this pull request? ### Why are the changes needed? Similar to CELEBORN-1457, `sortedFilesDb` may also fail to initialize. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? GA Closes #2831 from cxzl25/CELEBORN-1661. Authored-by: sychen Signed-off-by: Shuang --- .../service/deploy/worker/storage/PartitionFilesSorter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/PartitionFilesSorter.java b/worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/PartitionFilesSorter.java index c79d7a08a..86315d329 100644 --- a/worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/PartitionFilesSorter.java +++ b/worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/PartitionFilesSorter.java @@ -125,8 +125,8 @@ public class PartitionFilesSorter extends ShuffleRecoverHelper { this.sortedFilesDb = DBProvider.initDB(dbBackend, recoverFile, CURRENT_VERSION); reloadAndCleanSortedShuffleFiles(this.sortedFilesDb); } catch (Exception e) { - logger.error("Failed to reload DB for sorted shuffle files from: " + recoverFile, e); - this.sortedFilesDb = null; + throw new IllegalStateException( + "Failed to reload DB for sorted shuffle files from: " + recoverFile, e); } } else { this.sortedFilesDb = null;