zuston commented on code in PR #485:
URL: https://github.com/apache/incubator-uniffle/pull/485#discussion_r1070750572


##########
server/src/main/java/org/apache/uniffle/server/storage/HdfsStorageManager.java:
##########
@@ -84,31 +84,32 @@ public Storage selectStorage(ShuffleDataReadEvent event) {
   @Override
   public void removeResources(PurgeEvent event) {
     String appId = event.getAppId();
-    String user = event.getUser();
     HdfsStorage storage = getStorageByAppId(appId);
-    if (storage != null) {
-      if (event instanceof AppPurgeEvent) {
-        storage.removeHandlers(appId);
-      }
+    if (storage == null) {
+      LOG.warn("Storage gotten is null when removing resources for event: {}", 
event);
+      return;
+    }
+    if (event instanceof AppPurgeEvent) {
+      storage.removeHandlers(appId);
       appIdToStorages.remove(appId);

Review Comment:
   Emm.. This stage level purge is introduced by me and this bug is occurred 
only in HDFS storage manager. And we only use the HDFS to store shuffle data 
for huge partition. So in the most scenarios, this bug will not happen. 



-- 
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