Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/java/org/apache/cassandra/db/commitlog/CommitLogReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package org.apache.cassandra.db.commitlog;

import java.io.IOError;
import java.nio.file.Files;
import java.nio.file.Path;
import java.io.*;
Expand Down Expand Up @@ -119,6 +120,19 @@ static List<File> filterCommitLogFiles(File[] toFilter)
// let recover deal with it
filtered.add(file);
}
catch (IOError e)
{
// Only handle file-not-found errors gracefully; let other IOErrors propagate
// as they may indicate corruption or serious I/O issues
if (e.getCause() instanceof java.nio.file.NoSuchFileException)
{
filtered.add(file);
}
else
{
throw e;
}
}
}

return filtered;
Expand Down