{"record":{"id":"4ea980fea233eeb8","repo":"apache/hadoop","slug":"failed-to-since-a-rolling-upgrade-is-already-in","errorCode":null,"errorMessage":"Failed to {} since a rolling upgrade is already in progress. Existing rolling upgrade info:\n{}","messagePattern":"Failed to (.+?) since a rolling upgrade is already in progress\\. Existing rolling upgrade info:\n(.+?)","errorType":"exception","errorClass":"RollingUpgradeException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java","lineNumber":7841,"sourceCode":"   *\n   * @param f feature to check\n   * @throws HadoopIllegalArgumentException if the current layout version in\n   *     effect is insufficient to support the feature\n   */\n  private void requireEffectiveLayoutVersionForFeature(Feature f)\n      throws HadoopIllegalArgumentException {\n    int lv = getEffectiveLayoutVersion();\n    if (!NameNodeLayoutVersion.supports(f, lv)) {\n      throw new HadoopIllegalArgumentException(String.format(\n          \"Feature %s unsupported at NameNode layout version %d.  If a \" +\n          \"rolling upgrade is in progress, then it must be finalized before \" +\n          \"using this feature.\", f, lv));\n    }\n  }\n\n  void checkRollingUpgrade(String action) throws RollingUpgradeException {\n    if (isRollingUpgrade()) {\n      throw new RollingUpgradeException(\"Failed to \" + action\n          + \" since a rolling upgrade is already in progress.\"\n          + \" Existing rolling upgrade info:\\n\" + rollingUpgradeInfo);\n    }\n  }\n\n  RollingUpgradeInfo finalizeRollingUpgrade() throws IOException {\n    final String operationName = \"finalizeRollingUpgrade\";\n    checkSuperuserPrivilege(operationName);\n    checkOperation(OperationCategory.WRITE);\n    writeLock(RwLockMode.FS);\n    try {\n      checkOperation(OperationCategory.WRITE);\n      if (!isRollingUpgrade()) {\n        return null;\n      }\n      checkNameNodeSafeMode(\"Failed to finalize rolling upgrade\");\n\n      finalizeRollingUpgradeInternal(now());","sourceCodeStart":7823,"sourceCodeEnd":7859,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L7823-L7859","documentation":"Error \"Failed to {} since a rolling upgrade is already in progress. Existing rolling upgrade info:\n{}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:7841 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the current rolling upgrade to finish, then retry the operation.","Finalize the in-progress rolling upgrade with 'hdfs dfsadmin -rollingUpgrade finalize' and retry.","If the rolling upgrade must be abandoned, roll it back with 'hdfs dfsadmin -rollingUpgrade downgrade' before retrying.","Check the current rolling upgrade state with 'hdfs dfsadmin -rollingUpgrade query' to see the existing rolling upgrade info reported in the error."],"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"}