This is an automated email from the ASF dual-hosted git repository.

jnioche pushed a commit to branch fix/blob-store-cluster-state-init
in repository https://gitbox.apache.org/repos/asf/storm.git

commit 3fd1eb08a0113fa499dd1a509da991709174948b
Author: Julien Nioche <[email protected]>
AuthorDate: Mon Mar 2 18:14:12 2026 +0000

    Fix silent exception swallow in LocalFsBlobStore.prepare()
    
    If ClusterUtils.mkStormClusterState() threw (e.g. ZooKeeper unreachable),
    the exception was caught and printed to stderr via e.printStackTrace(),
    leaving stormClusterState null. Every subsequent blob store operation
    (startSyncBlobs, setupBlobstore, blobSync) would then crash with a
    NullPointerException rather than a meaningful error.
    
    Rethrow as RuntimeException to match the existing pattern used a few
    lines above for FileBlobStoreImpl initialization, and to surface the
    root cause at startup instead of at first use.
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
 .../src/main/java/org/apache/storm/blobstore/LocalFsBlobStore.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/storm-server/src/main/java/org/apache/storm/blobstore/LocalFsBlobStore.java 
b/storm-server/src/main/java/org/apache/storm/blobstore/LocalFsBlobStore.java
index f708946fb..3fcd5eedd 100644
--- 
a/storm-server/src/main/java/org/apache/storm/blobstore/LocalFsBlobStore.java
+++ 
b/storm-server/src/main/java/org/apache/storm/blobstore/LocalFsBlobStore.java
@@ -110,7 +110,7 @@ public class LocalFsBlobStore extends BlobStore {
         try {
             this.stormClusterState = ClusterUtils.mkStormClusterState(conf, 
new ClusterStateContext(DaemonType.NIMBUS, conf));
         } catch (Exception e) {
-            e.printStackTrace();
+            throw new RuntimeException("Failed to initialize cluster state for 
LocalFsBlobStore", e);
         }
         timer = new Timer("BLOB-STORE-TIMER", true);
         this.leaderElector = leaderElector;

Reply via email to