Skip to content

Account for shared producer lifecycle demand once per workload - #519

Merged
zzylol merged 5 commits into
mainfrom
feat/shared-producer-lifecycle-demand
Sep 8, 2026
Merged

zzylol merged 5 commits into
mainfrom
feat/shared-producer-lifecycle-demand

Conversation

@zzylol

@zzylol zzylol commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Before this PR

Lifecycle selection constructed a single-query WorkloadDemand, even for a producer shared across registered roots. Per-query lifecycle snapshots could disagree without an explicit joint-evidence rejection.

After this PR

The physical binding pass associates each producer with its unique consumers and supplies their combined recurrence to the existing ASAPPlanner lifecycle planner. Source updates, build, retention and retirement are charged once; consumer reads accumulate. Conflicting lifecycle evidence fails closed. Publication reports lifecycle estimates keyed by materialization and implementation identity.

Example: over 300 seconds, reads every 10 and 20 seconds produce 45 reads and 30,000 source updates at 100 updates/second. With the test unit costs, lifecycle cost is 45.8; the second consumer adds 1.5, not another producer build/update stream.

Verification

647 control-plane library tests, 28 binary tests, one integration test; three production-process tests pass. Focused tests verify added-read cost, unchanged update count and conflicting evidence rejection.

Explicit limit

These are lifecycle component estimates, not a complete physical-workload comparison. Existing opaque per-query window costs cannot establish whole-workload scan, transmission, materialization and output-operator costs. Full provider-backed alternative ranking remains a separate gate; no unknown cost is reported as zero. Stacked on #518; no automatic merge.

@zzylol
zzylol changed the base branch from feat/unified-workload-entrypoints to main September 8, 2026 20:17
@zzylol
zzylol merged commit bbf9cc1 into main Sep 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant