{"record":{"id":"070333d13162a9d8","repo":"apache/dolphinscheduler","slug":"get-key-s-children-error","errorCode":null,"errorMessage":"Get key: %s children error","messagePattern":"Get key: (.+?) children 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":174,"sourceCode":"        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\n    @Override\n    public boolean exists(String key) {\n        try {\n            return jdbcRegistryClient.existJdbcRegistryDataKey(key);\n        } catch (Exception e) {\n            throw new RegistryException(String.format(\"Check key: %s exist error\", key), e);\n        }\n    }\n\n    @Override\n    public boolean acquireLock(String key) {\n        try {\n            jdbcRegistryClient.acquireJdbcRegistryLock(key);\n            return true;\n        } catch (RegistryException e) {","sourceCodeStart":156,"sourceCodeEnd":192,"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#L156-L192","documentation":"Thrown by JdbcRegistry.children when listing the direct children of a key fails in the database. The path computation from child full paths also happens inside the try block, so a malformed stored key can trigger this too.","triggerScenarios":"Calling registry.children(key) during a DB error, or when stored child keys are malformed relative to the parent prefix (e.g. prefix length math on an unexpected path).","commonSituations":"DB outage, corrupted or manually-edited registry rows whose data_key does not start with the queried parent path, empty parent path producing bad substring math.","solutions":["Check the cause exception for the actual failure","Verify all stored keys under this parent start with the parent path prefix","Confirm DB connectivity and schema","Validate the key argument is non-empty and well-formed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (key == null || key.isEmpty()) throw new IllegalArgumentException(\"key required\");","typeGuard":null,"tryCatchPattern":"try { children = registry.children(key); } catch (RegistryException e) { log.error(\"children failed for {}\", key, e.getCause()); children = List.of(); }","preventionTips":["Never hand-edit registry rows; malformed keys break prefix math","Keep child keys prefixed with the parent path","Verify DB connectivity before batch traversals"],"tags":["registry","jdbc","children"],"backgroundTag":"database-query-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"}