Skip to content

introspect/dump-cluster: parallelize per-node and per-database work #92

Description

@orian

Symptom

All introspection is single-threaded: dump-cluster iterates nodes sequentially with a fresh connection each (cmd/hclexp/hclexp.go:392-400), and introspectSchema loops databases serially (hclexp.go:271-280).

Impact

Dumping a large fleet is O(nodes x databases) wall-clock; a 30-node cluster dump takes 30x longer than it needs to.

Fix direction

Fan out per-node dumps (and optionally per-database introspection) with an errgroup and a bounded concurrency flag (e.g. -parallel 8). Output writing is already per-node files, so there is no shared-state hazard beyond logging.

Found in the 2026-07-02 deep-dive audit (docs/plans/2026-07-02-deep-dive-improvement-areas.md, B8).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions