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

cshannon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 5147077ff1 Handle FileNotFoundException during failed compaction 
cleanup (#5103)
5147077ff1 is described below

commit 5147077ff1535294f469a52732a3b0f3d985c236
Author: Christopher L. Shannon <cshan...@apache.org>
AuthorDate: Sun Nov 24 15:13:11 2024 -0500

    Handle FileNotFoundException during failed compaction cleanup (#5103)
    
    Stops a directory not being found from preventing the search through
    the volumes from continuing
    
    This closes #5087
---
 .../compaction/coordinator/CompactionCoordinator.java        | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git 
a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
 
b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
index 925da279fc..4e49b825b0 100644
--- 
a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
+++ 
b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
@@ -852,10 +852,14 @@ public class CompactionCoordinator
                   final FileSystem fs = vol.getFileSystem();
                   for (ExternalCompactionId ecid : ecidsForTablet) {
                     final String fileSuffix = "_tmp_" + ecid.canonical();
-                    FileStatus[] files = fs.listStatus(new Path(volPath), 
(path) -> {
-                      return path.getName().endsWith(fileSuffix);
-                    });
-                    if (files.length > 0) {
+                    FileStatus[] files = null;
+                    try {
+                      files = fs.listStatus(new Path(volPath),
+                          (path) -> path.getName().endsWith(fileSuffix));
+                    } catch (FileNotFoundException e) {
+                      LOG.trace("Failed to list tablet dir {}", volPath, e);
+                    }
+                    if (files != null) {
                       for (FileStatus file : files) {
                         if (!fs.delete(file.getPath(), false)) {
                           LOG.warn("Unable to delete ecid tmp file: {}: ", 
file.getPath());

Reply via email to