Repository navigation
Conversation
…the series (failing first) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
…series labels
A grouped query's chain over a Scan keeps its grouping labels (e.g.
region, service) beside the series identity. Its rows are still one per
series, so each label is the state's series' label, empty when the
series lacks it, as a raw-data read fills a label column. Such a view
was refused at startup ("its rows have column region, which a collector
state does not carry"). A text column of a view not directly over a Scan
is still refused: it need not be a series label.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
max by (region, service) (quantile_over_time(0.99, data[1m])), the plan has a second DDSketch chain that keepsregionandservicebeside the series identity. As a collector view, that chain made the data plane refuse to start:collector view 11: its rows have column region, which a collector state does not carry.Scanis now filled from the state's series labels, empty when the series lacks the label. A raw-data read fills a label column the same way.Review guide
feat/collector-state-lineage(Collector view states: sequence numbers and deltas, incomplete windows, idle close from the declared delay #893) at 9492be2, because Collector view states: sequence numbers and deltas, incomplete windows, idle close from the declared delay #893 rewritescrates/precompute/src/collector.rs. This PR stays out of the lineage, reorder-buffer and incomplete-window code. It touches onlyCollectorViews::new(the column check), theCollectorViewstruct andCollectorViews::rows.CollectorViews::newand the label fill inCollectorViews::rows.Behavior: before → after
The workload is W3's four quantile queries plus
max by (region, service) (quantile_over_time(0.99, data[1m]))at a 5% target, every 5 s.datahas 10k series withregion,service,jobandlabel_0labels. The control plane plans two DDSketch chains:(window end, $promql_series_identity, state);(window end, region, service, $promql_series_identity, state).Both chains read the
Scanofdatadirectly.--emit-collector-viewslists[1, 12]for the collector.data_plane --collector-views cv.jsonstartupcollector view 12: its rows have column region, which a collector state does not carry(region, service)series, equal to the raw-ingest armInterfaces
None.
CollectorView(private) gains alabel_columns: Vec<(usize, String)>field.Algorithm changes
Which collector views install, and how a collector window's rows are built.
Scan, eachUtf8column other than the series identity is a label column.rowssets it toseries.labels()[name], or""when the series lacks that label (asColumnKind::Labelin a raw-data read).Scan, such as aProjectthat could compute its own text.Scankeeps a series identity, so it is per series (PerEntity). TheScan's text columns are the series' labels, which are functions of the series. The state's row therefore holds the same values the view's own run writes from raw samples.a_collector_views_label_columns_come_from_its_series_labelschecks a full label set and a series missingservice, and the demo checks the grouped query against the raw-ingest arm.Decisions and open questions
None.
Verification
precompute --lib collectora_collector_views_label_columns_come_from_its_series_labels(a grouped query's chain installs as a collector view; rows takeregion/servicefrom the series,""when missing). It failed first with the demo's exact error.cargo fmt --check;cargo clippy -p precompute --all-targets -D warningsLive demo (binary = #893 + #894 + #898 + this PR; W3 plus the grouped query; 5-minute window after 7 minutes of running):
max by (region, service) (quantile_over_time(0.99, data[1m]))The other four W3 queries stay at A == B 1.0000 and within 5% 1.000 in the same window. A's ASAPQuery-backend ran at 0.200 cores and B's at 0.298 cores.
Follow-ups
🤖 Generated with Claude Code
https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf