Skip to content

Why are physical alternatives capped at 64? #708

Description

@milindsrivastava1997

Question

Why is the number of physical alternatives capped at 64?

Where the limit is

  • control_plane/src/physical/workload_cost.rs:572 (select_with_frontend) rejects more than 64 candidates:
    if candidates.is_empty() || candidates.len() > 64 {
        return Err(invalid("candidate inventory must contain 1..=64 alternatives"));
    }
  • control_plane/src/physical/workload_cost/materialization_candidates.rs:40 (enumerate) stops adding masks at 63, which leaves one slot for the all-Prometheus alternative that with_exact_alternative appends ("Reserve one of the selector's 64 candidate slots for native execution").

The 64 limit was added in 179c82c ("Compare complete bound workloads using strict provider cost evidence"). The 63 mask cap came in with 6f4be13 ("Execute mixed ASAP and Prometheus query DAGs"). Neither the code nor the docs explain why the number is 64.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions