From 4e150535f5bc4e8316bd083db702b3d62567ed93 Mon Sep 17 00:00:00 2001 From: lovewin99 Date: Wed, 16 Aug 2023 17:06:31 +0800 Subject: [PATCH] Delete metadata that has been deleted in UFS when the client cancels. --- .../java/alluxio/master/file/DefaultFileSystemMaster.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dora/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java b/dora/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java index f318b21d0bf6..d184a34ae758 100644 --- a/dora/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java +++ b/dora/core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java @@ -2223,7 +2223,10 @@ public void deleteInternal(RpcContext rpcContext, LockedInodePath inodePath, // We go through each inode, removing it from its parent set and from mDelInodes. If it's a // file, we deal with the checkpoints and blocks as well. for (int i = inodesToDelete.size() - 1; i >= 0; i--) { - rpcContext.throwIfCancelled(); + if (rpcContext.isCancelled()) { + inodesToDelete.set(i, null); + continue; + } Pair inodePairToDelete = inodesToDelete.get(i); AlluxioURI alluxioUriToDelete = inodePairToDelete.getFirst(); Inode inodeToDelete = inodePairToDelete.getSecond().getInode();