apache/dolphinscheduler · error · RegistryException

Get key: %s children error

Error message

Get key: %s children error

What it means

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.

Source

Thrown at dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcRegistry.java:174

        try {
            jdbcRegistryClient.deleteJdbcRegistryDataByKey(key);
        } catch (Exception e) {
            throw new RegistryException(String.format("Delete key: %s error", key), e);
        }
    }

    @Override
    public Collection<String> children(String key) {
        try {
            final List<JdbcRegistryDataDTO> children = jdbcRegistryClient.listJdbcRegistryDataChildren(key);
            return children
                    .stream()
                    .map(JdbcRegistryDataDTO::getDataKey)
                    .map(fullPath -> StringUtils.substringBefore(fullPath.substring(key.length() + 1), "/"))
                    .distinct()
                    .collect(Collectors.toList());
        } catch (Exception e) {
            throw new RegistryException(String.format("Get key: %s children error", key), e);
        }
    }

    @Override
    public boolean exists(String key) {
        try {
            return jdbcRegistryClient.existJdbcRegistryDataKey(key);
        } catch (Exception e) {
            throw new RegistryException(String.format("Check key: %s exist error", key), e);
        }
    }

    @Override
    public boolean acquireLock(String key) {
        try {
            jdbcRegistryClient.acquireJdbcRegistryLock(key);
            return true;
        } catch (RegistryException e) {

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Check the cause exception for the actual failure
  2. Verify all stored keys under this parent start with the parent path prefix
  3. Confirm DB connectivity and schema
  4. Validate the key argument is non-empty and well-formed
Defensive patterns

Strategy: try-catch

Validate before calling

if (key == null || key.isEmpty()) throw new IllegalArgumentException("key required");

Try / catch

try { children = registry.children(key); } catch (RegistryException e) { log.error("children failed for {}", key, e.getCause()); children = List.of(); }

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/070333d13162a9d8. Report an issue: GitHub.