Skip to content

Timing: a node shared across batch queries with different timings fails with ConflictingTiming #654

Open

Description

@zzylol

Found in the #541 review.

Problem

apply_lifecycle_timings with one TimingMemo across a batch fails with ConflictingTiming when two queries share a node but need different timings. Example:

  • query 1 maintains SummaryAgg(exact sum, scan) at ingestion time;
  • query 2 reads the same Scan at query time through Limit(scan).

The cause: split_shared_by_phase splits shared nodes only within one root, while the memo spans every root of the batch. The batch test (types/tests/physical_export.rs) only shares a node at a single timing, so it does not cover this case.

Why it is latent

At the top of the stack, the only workload-timing caller (execution_timed_dag) uses MaterializationAssignment::all_query_time(), so a shared node is always timed the same way.

Follow-up

When ingestion-time maintenance comes back, add a workload version of split_shared_by_phase that takes &[Rc<OperatorNode>]. It should collect the timings reached from all roots and rebuild them with one shared copies map. Add a two-query regression test.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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