{"record":{"id":"72c42da3406b607b","repo":"apache/dolphinscheduler","slug":"delete-key-s-error","errorCode":null,"errorMessage":"Delete key: %s error","messagePattern":"Delete key: (.+?) error","errorType":"exception","errorClass":"RegistryException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcRegistry.java","lineNumber":159,"sourceCode":"        }\n    }\n\n    @Override\n    public void put(String key, String value, boolean deleteOnDisconnect) {\n        try {\n            DataType dataType = deleteOnDisconnect ? DataType.EPHEMERAL : DataType.PERSISTENT;\n            jdbcRegistryClient.putJdbcRegistryData(key, value, dataType);\n        } catch (Exception ex) {\n            throw new RegistryException(String.format(\"put key:%s, value:%s error\", key, value), ex);\n        }\n    }\n\n    @Override\n    public void delete(String key) {\n        try {\n            jdbcRegistryClient.deleteJdbcRegistryDataByKey(key);\n        } catch (Exception e) {\n            throw new RegistryException(String.format(\"Delete key: %s error\", key), e);\n        }\n    }\n\n    @Override\n    public Collection<String> children(String key) {\n        try {\n            final List<JdbcRegistryDataDTO> children = jdbcRegistryClient.listJdbcRegistryDataChildren(key);\n            return children\n                    .stream()\n                    .map(JdbcRegistryDataDTO::getDataKey)\n                    .map(fullPath -> StringUtils.substringBefore(fullPath.substring(key.length() + 1), \"/\"))\n                    .distinct()\n                    .collect(Collectors.toList());\n        } catch (Exception e) {\n            throw new RegistryException(String.format(\"Get key: %s children error\", key), e);\n        }\n    }\n","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcRegistry.java#L141-L177","documentation":"Wrapper thrown in JdbcRegistry.delete: any exception from jdbcRegistryClient.deleteJdbcRegistryDataByKey (SQL failure, missing table, connection problems) is converted to a RegistryException naming the key, so registry callers get a uniform checked-style failure with the cause preserved.","triggerScenarios":"Calling registry.delete(key) when the DB connection fails, the transaction cannot commit, or the delete statement errors.","commonSituations":"DB outage or failover mid-operation, connection pool exhausted, permissions revoked on the registry table, deadlocks.","solutions":["Inspect the cause for the actual SQL/connection failure","Verify DB connectivity and table permissions","Retry the delete; if the key is already gone the operation may be safely skipped","Check for lock contention with other registry clients"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// optionally check exists(key) if delete idempotency matters","typeGuard":null,"tryCatchPattern":"try { registry.delete(key); } catch (RegistryException e) { log.warn(\"delete failed for {}\", key, e); }","preventionTips":["Treat delete as idempotent and tolerate failures for already-removed keys","Check table write permissions for the registry user","Watch for deadlocks under concurrent delete/load"],"tags":["registry","jdbc","database-delete"],"backgroundTag":"database-write-failed","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}