apache/hadoop · error · SnapshotException
Failed to gcDeletedSnapshot {} from {}: snapshot is not mark
Error message
Failed to gcDeletedSnapshot {} from {}: snapshot is not marked as deleted What it means
Error "Failed to gcDeletedSnapshot {} from {}: snapshot is not marked as deleted" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java:337
throws IOException {
final String path = iip.getPath();
final INodeDirectory dir = INodeDirectory.valueOf(iip.getLastINode(), path);
if (!dir.isSnapshottable()) {
throw new SnapshotException(
"Directory is not a snapshottable directory: " + path);
}
return dir;
}
public void assertMarkedAsDeleted(INodesInPath iip, String snapshotName)
throws IOException {
final INodeDirectory dir = getSnapshottableRoot(iip);
final Snapshot.Root snapshotRoot = dir.getDirectorySnapshottableFeature()
.getSnapshotByName(dir, snapshotName)
.getRoot();
if (!snapshotRoot.isMarkedAsDeleted()) {
throw new SnapshotException("Failed to gcDeletedSnapshot "
+ snapshotName + " from " + dir.getFullPathName()
+ ": snapshot is not marked as deleted");
}
}
void assertPrior(INodeDirectory dir, String snapshotName, int prior)
throws SnapshotException {
if (!isSnapshotDeletionOrdered()) {
return;
}
// prior must not exist
if (prior != Snapshot.NO_SNAPSHOT_ID) {
throw new SnapshotException("Failed to removeSnapshot "
+ snapshotName + " from " + dir.getFullPathName()
+ ": Unexpected prior (=" + prior + ") when "
+ DFS_NAMENODE_SNAPSHOT_DELETION_ORDERED
+ " is " + isSnapshotDeletionOrdered());
}View on GitHub (pinned to 2add963021)
Solutions
- Ensure the snapshot was actually deleted (marked for deletion) before requesting GC of the deleted snapshot.
When it happens
Trigger: Garbage collection is requested for a snapshot that is not marked as deleted.
Common situations: Internal snapshot GC running against a snapshot whose deletion did not complete or was reverted.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/0b7288233ee7ed0c.
Report an issue: GitHub.