Skip to content

[Subtask]: D17 [baseline] Evaluate per-tenant optional-feature catalog cost and simplify initialization ownership #32294

Open

Description

@XuPeng-SH

Parent Issue

Parent issue: #32278

Detail of Subtask

Catalog ID: D17
Origin: B - Pre-existing in the 4.2 baseline and retained on main
Evidence level: Eager initialization confirmed; benefit/cost decision remains open

4.2 versus main: provenance

Both baseline and main include eight Iceberg DDLs and two MongoDB DDLs in createSqls. General-tenant initialization excludes sys-only statements but does not filter these declarations by actual feature use. These are not ten new main tables.

Design problem, impact, and existing responsibility

Tenants that do not use those features still incur initialization, indexes, upgrade, restore, and cleanup-list costs that scale with tenant count. Eager creation may provide schema consistency and reliable first use, so empty-table counts alone do not establish a defect.

Acceptance criteria

  • Measure creation, upgrade, restore, and idle-metadata cost at representative tenant scale and record the resulting choice.
  • If behavior changes, preserve concurrent first use, permissions, backup/restore, failure retries, and system-metadata visibility.
  • Reuse existing initialization definitions/ownership and remove replaced paths; do not introduce more expensive persistent mechanisms merely to avoid a few empty tables.

Describe implementation you've considered

Compare the complete cost of eager versus activation-time initialization under existing tenant/catalog lifecycle ownership. Identify objects that genuinely need to exist by default. Retain eager creation if it is simpler with justified benefits; avoid per-SQL probing, parallel migration state, or separate concurrent-initialization paths.

Additional information

Existing investigation and validation limits

Both branches' createSqls and general-tenant loops confirm eager provisioning. No large-tenant end-to-end cost measurement exists yet. This is an evaluation/optimization task, not a requirement to adopt lazy creation.

main investigation snapshot: pkg/frontend/authenticate.go:1038; pkg/frontend/authenticate.go:11469

4.2 baseline snapshot: pkg/frontend/authenticate.go:1031

The named probes are local diagnostic overlays, not committed repository tests. Their names identify the investigation; they cannot be selected directly from an ordinary checkout. Implement the smallest maintained contract regressions and reuse relevant CI/validation proportionally. Temporary evidence commits are not required.

Activity

  1. self-assigned this
    on Nov 5, 2026
  2. added theissue type on Nov 5, 2026
  3. changed the title [-][Subtask]: D17 [base] 核算可选功能 catalog 的每租户固定成本并简化初始化职责[/-] [+][Subtask]: D17 [baseline] Evaluate per-tenant optional-feature catalog cost and simplify initialization ownership[/+] on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions