{"record":{"id":"1ae44546acba4071","repo":"apache/hadoop","slug":"failed-to-create-the-snapshot-the-filesystem-has","errorCode":null,"errorMessage":"Failed to create the snapshot. The FileSystem has run out of snapshot IDs and ID rollover is not supported and the max snapshot limit is: {}","messagePattern":"Failed to create the snapshot\\. The FileSystem has run out of snapshot IDs and ID rollover is not supported and the max snapshot limit is: (.+?)","errorType":"exception","errorClass":"SnapshotException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java","lineNumber":458,"sourceCode":"   *          The name of the snapshot.\n   * @param mtime is the snapshot creation time set by Time.now().\n   * @throws IOException\n   *           Throw IOException when 1) the given path does not lead to an\n   *           existing snapshottable directory, and/or 2) there exists a\n   *           snapshot with the given name for the directory, and/or 3)\n   *           snapshot number exceeds quota\n   */\n  public String createSnapshot(final LeaseManager leaseManager,\n      final INodesInPath iip, String snapshotRoot, String snapshotName,\n      long mtime)\n      throws IOException {\n    INodeDirectory srcRoot = getSnapshottableRoot(iip);\n\n    if (snapshotCounter == getMaxSnapshotID()) {\n      // We have reached the maximum allowable snapshot ID and since we don't\n      // handle rollover we will fail all subsequent snapshot creation\n      // requests.\n      throw new SnapshotException(\n          \"Failed to create the snapshot. The FileSystem has run out of \" +\n          \"snapshot IDs and ID rollover is not supported \" +\n              \"and the max snapshot limit is: \" + maxSnapshotLimit);\n    }\n    int n = numSnapshots.get();\n    checkFileSystemSnapshotLimit(n);\n    srcRoot.addSnapshot(this, snapshotName, leaseManager, mtime);\n      \n    //create success, update id\n    snapshotCounter++;\n    numSnapshots.getAndIncrement();\n    return Snapshot.getSnapshotPath(snapshotRoot, snapshotName);\n  }\n\n  void checkFileSystemSnapshotLimit(int n) throws SnapshotException {\n    checkSnapshotLimit(maxSnapshotFSLimit, n, \"file system\");\n  }\n","sourceCodeStart":440,"sourceCodeEnd":476,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java#L440-L476","documentation":"Error \"Failed to create the snapshot. The FileSystem has run out of snapshot IDs and ID rollover is not supported and the max snapshot limit is: {}\" thrown in apache/hadoop.","triggerScenarios":"Snapshot creation fails because all snapshot IDs up to the max limit are consumed.","commonSituations":"Very large numbers of snapshots accumulated on a snapshottable directory hitting the ID ceiling.","solutions":["Delete existing snapshots to free IDs; the snapshot ID space is exhausted and rollover is unsupported."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}