{"record":{"id":"fabe81099da553c5","repo":"apache/hadoop","slug":"failed-to-update-delegation-key-in-sql-secret-mana","errorCode":null,"errorMessage":"Failed to update delegation key in SQL secret manager","messagePattern":"Failed to update delegation key in SQL secret manager","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/SQLDelegationTokenSecretManager.java","lineNumber":361,"sourceCode":"      throw new IOException(\"Failed to store delegation key in SQL secret manager\", e);\n    }\n  }\n\n  /**\n   * Updates an existing DelegationKey in the SQL database.\n   * @param key Updated DelegationKey.\n   */\n  @Override\n  protected void updateDelegationKey(DelegationKey key) throws IOException {\n    try (ByteArrayOutputStream bos = new ByteArrayOutputStream();\n        DataOutputStream dos = new DataOutputStream(bos)) {\n      key.write(dos);\n      // Update delegation key in SQL database\n      updateDelegationKey(key.getKeyId(), bos.toByteArray());\n      // Update delegation key in local cache\n      super.updateDelegationKey(key);\n    } catch (SQLException e) {\n      throw new IOException(\"Failed to update delegation key in SQL secret manager\", e);\n    }\n  }\n\n  /**\n   * Removes the existing DelegationKey from the SQL database to\n   * invalidate it.\n   * @param key DelegationKey to remove from the SQL database.\n   */\n  @Override\n  protected void removeStoredMasterKey(DelegationKey key) {\n    try {\n      deleteDelegationKey(key.getKeyId());\n    } catch (SQLException e) {\n      LOG.warn(\"Failed to remove delegation key in SQL secret manager\", e);\n    }\n  }\n\n  /**","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/SQLDelegationTokenSecretManager.java#L343-L379","documentation":"Error \"Failed to update delegation key in SQL secret manager\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/SQLDelegationTokenSecretManager.java:361 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Updating the delegation key row failed. Confirm the key row exists and the connection is healthy; see the chained SQLException."],"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-23T01:17:44.959Z"}