{"record":{"id":"c5b02fa00cdc0cf4","repo":"apache/hadoop","slug":"zone-zonename-is-not-under-re-encryption","errorCode":null,"errorMessage":"Zone ${zoneName} is not under re-encryption","messagePattern":"Zone (.+?) is not under re-encryption","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ReencryptionHandler.java","lineNumber":262,"sourceCode":"\n    threadPool.allowCoreThreadTimeOut(true);\n    this.batchService = new ExecutorCompletionService(threadPool);\n    reencryptionUpdater =\n        new ReencryptionUpdater(dir, batchService, this, conf);\n    currentBatch = new ReencryptionBatch(reencryptBatchSize);\n    traverser = new ReencryptionPendingInodeIdCollector(dir, this, conf);\n  }\n\n  ReencryptionStatus getReencryptionStatus() {\n    return ezManager.getReencryptionStatus();\n  }\n\n  void cancelZone(final long zoneId, final String zoneName) throws IOException {\n    assert dir.hasWriteLock();\n    final ZoneReencryptionStatus zs =\n        getReencryptionStatus().getZoneStatus(zoneId);\n    if (zs == null || zs.getState() == State.Completed) {\n      throw new IOException(\"Zone \" + zoneName + \" is not under re-encryption\");\n    }\n    zs.cancel();\n    removeZoneTrackerStopTasks(zoneId);\n  }\n\n  void removeZone(final long zoneId) {\n    assert dir.hasWriteLock();\n    LOG.info(\"Removing zone {} from re-encryption.\", zoneId);\n    removeZoneTrackerStopTasks(zoneId);\n    getReencryptionStatus().removeZone(zoneId);\n  }\n\n  synchronized private void removeZoneTrackerStopTasks(final long zoneId) {\n    final ZoneSubmissionTracker zst = submissions.get(zoneId);\n    if (zst != null) {\n      zst.cancelAllTasks();\n      submissions.remove(zoneId);\n    }","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ReencryptionHandler.java#L244-L280","documentation":"Error \"Zone ${zoneName} is not under re-encryption\" thrown in apache/hadoop.","triggerScenarios":"A re-encryption tracking/commit step references an encryption zone with no active re-encryption.","commonSituations":"Running reencryption finalize/cancel on a zone that was never started or already completed.","solutions":["Start re-encryption for the zone first ('hdfs crypto -reencryptZone -action start'), or check that the zone name is correct."],"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"}