Repository navigation
Collector view states: ingest OTLP states of the views a collector builds, staged and committed as the view's windows - #890
Draft
zzylol wants to merge 12 commits into
Conversation
zzylol
force-pushed
the
feat/collector-state-ingest
branch
from
November 29, 2026 00:55
8c6f738 to
4d1070d
Compare
zzylol
changed the base branch from
feat/idle-wall-clock-close
to
feat/late-merge-committed-windows
November 29, 2026 00:55
zzylol
added a commit
that referenced
this pull request
Nov 29, 2026
…ws file and CLI Collector windows now commit when their states arrive (#890), so the grace has no reader: CommitGrace, CollectorViewsFile::commit_grace_ms and --collector-export-interval-ms / --collector-clock-skew-allowance-ms go. The collector's window_close_delay_ms capability stays as it declares it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
zzylol
added a commit
that referenced
this pull request
Nov 29, 2026
… insert missing windows; shards wait for a pass's routing - A group whose states depend on the order of their samples (Counter for rate/increase, IRate) keeps its raw samples for its views' retention. A late sample of it is stored as raw data too, and its window is computed again from the raw data whole and replaces the stored one; the windows built from it are computed again from the views. Such a group is not built by push. KLL and float sums keep the merge. - A pane's raw rows stay in time order: an out-of-order append (a late sample) rebuilds the pane as one chunk sorted by time. - ViewStore::replace_window replaces a window, or inserts one missing behind the newest within retention (for a collector view's window whose first states come late, #890); merge_late can insert likewise. - After answering a flush, a shard holds its samples until the routing of that pass (the Maintain the coordinator now sends after every flushed pass), so no sample is routed by windows a pass has closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
zzylol
force-pushed
the
feat/collector-state-ingest
branch
from
November 29, 2026 18:01
4d1070d to
6d57168
Compare
zzylol
added a commit
that referenced
this pull request
Nov 29, 2026
…ws file and CLI Collector windows now commit when their states arrive (#890), so the grace has no reader: CommitGrace, CollectorViewsFile::commit_grace_ms and --collector-export-interval-ms / --collector-clock-skew-allowance-ms go. The collector's window_close_delay_ms capability stays as it declares it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
zzylol
force-pushed
the
feat/collector-state-ingest
branch
from
November 30, 2026 02:33
6d57168 to
cd13693
Compare
zzylol
added a commit
that referenced
this pull request
Nov 30, 2026
…ws file and CLI Collector windows now commit when their states arrive (#890), so the grace has no reader: CommitGrace, CollectorViewsFile::commit_grace_ms and --collector-export-interval-ms / --collector-clock-skew-allowance-ms go. The collector's window_close_delay_ms capability stays as it declares it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
zzylol
added a commit
that referenced
this pull request
Nov 30, 2026
…ws file and CLI Collector windows now commit when their states arrive (#890), so the grace has no reader: CommitGrace, CollectorViewsFile::commit_grace_ms and --collector-export-interval-ms / --collector-clock-skew-allowance-ms go. The collector's window_close_delay_ms capability stays as it declares it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
zzylol
added a commit
that referenced
this pull request
Nov 30, 2026
…close CollectorViewOptions gained idle_close_ms (#890); the collector-views file does not carry the collector's close delay (a new field would be refused by readers that deny unknown fields), so the options it gives take the default 6 s + 2 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
zzylol
force-pushed
the
feat/collector-state-ingest
branch
from
November 30, 2026 06:21
8411b5b to
742e799
Compare
zzylol
added a commit
that referenced
this pull request
Nov 30, 2026
…ws file and CLI Collector windows now commit when their states arrive (#890), so the grace has no reader: CommitGrace, CollectorViewsFile::commit_grace_ms and --collector-export-interval-ms / --collector-clock-skew-allowance-ms go. The collector's window_close_delay_ms capability stays as it declares it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
zzylol
added a commit
that referenced
this pull request
Nov 30, 2026
…close CollectorViewOptions gained idle_close_ms (#890); the collector-views file does not carry the collector's close delay (a new field would be refused by readers that deny unknown fields), so the options it gives take the default 6 s + 2 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
…s the view's windows
A view of the installed plan that a collector builds (docs/design/collector-sketch-ingest.md)
arrives on /v1/metrics as OTLP summary points under `<metric>.asap_view.<node_id>`,
with the view identity (plan id, node id, view state key) in the metric's metadata
and each series' window state as ASAPv1 bytes in `sketch.envelope`.
- common: ViewStateBatch (view -> series -> records), the identity keys.
- otlp: one walk; a metric naming a view gives states (labels from the raw
path's label function), every other metric samples, as before.
- precompute: each collector view (PrecomputeOptions::collector) is a refresh
group of its own that no run computes. States are checked (plan, view, key,
name, window), decoded into the view's kernel with storage's ASAPv1 codec,
staged per (view, series, window) with a set of envelope hashes (repeat:
duplicate; new: merged), and committed through the committer when the wall
clock passes the window's end by the commit grace; later states are dropped
as late, a window with no state is not stored. A group reading a collector
view waits for its windows; Scans only collector views read keep no samples.
- metrics: asap_collector_states_{total,rejected_total,windows_total,
arrival_delay_seconds}, per view.
Rebased onto the late-merge PR as one commit (the six commits of
8c6f738, resolved once against it):
- fix(collector views): hold a collector window's states in the view layout, as a computed window
- perf(otlp): keep the raw path's per-point and per-metric work as before
- fix(collector views): stage and close collector windows by the engine's clock
- fix(collector views): align a collector view's readers on every start; stage states before samples
- fix(collector views): review fixes: readers of collector groups, open-window start, rows on the committer
- feat(ingest): collector view states over OTLP, staged and committed as the view's windows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
…t request counts once (failing first) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
…within retention A collector request's staged windows close when the request ends, and the request is answered once they are committed: no commit grace (the 8 s grace cost every window about 6 s of freshness, while states arrive within half a second of the window's end). A state that comes later for a committed window still kept merges into it through the late merge of window past retention, or closed without states, is dropped as late. The hashes of each committed window's states are kept while the window is, per series, so a resent state or request merges nothing twice. CollectorViewOptions::commit_grace_ms is removed; the report and asap_collector_states_total gain late_merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
…:read's batch; one collector test helper Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
… window's is stored, its wider level rebuilt (failing first) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
… window's is stored Collector states of a closed window still kept that was never stored (its first states came after a later window committed, e.g. from a collector lagging more than a window) go to the late path with insert set: the window is stored behind the newest (#892's replace_window / merge_late), and the wider windows read from it that closed meanwhile are computed again (inserted when their first run failed on the missing window). They count as late_merged; only a window past retention is late_dropped. Collector windows also count in the committer's closed-through, which decides which readers take a change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
… its emitted window A collector that got late samples of a window it already emitted sends a state of the late samples alone for that window and series. Its bytes differ, so it merges (late_merged) and the window answers as if every sample had come on time; sent again, it is a duplicate. The existing per-(window, series) hash set already gives this; the test pins it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
…ng first) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
A collector view's window that closed with no state (a feed gap) was
counted empty and not stored, so every range over it failed ("has no
rows tiling", HTTP 422), while the backend-only path stores its idle
windows empty and answers. It is now committed empty (still counted
empty), and states or corrections coming later merge into it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
…ck (failing first) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
…k and are stored empty
Collector windows closed only when states arrived, so while a collector
stream was idle none closed and every range over the idle period failed
("has no rows tiling", HTTP 422), for good if the stream never resumed.
As #889's idle close does for samples, a collector view's group now has
an idle watermark on the monotonic clock: the newest state's window end
(capped at its arrival's wall-clock time) plus the monotonic time since
it arrived, less the collector's close delay and skew allowance
(CollectorViewOptions::idle_close_ms, default 6 s + 2 s). Windows it
passes close with no state and are stored empty; states or corrections
of them coming later merge in (#892). Nothing closes on the clock before
a group's first states.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
zzylol
force-pushed
the
feat/collector-state-ingest
branch
from
November 30, 2026 07:30
742e799 to
b7b9312
Compare
zzylol
added a commit
that referenced
this pull request
Nov 30, 2026
…ws file and CLI Collector windows now commit when their states arrive (#890), so the grace has no reader: CommitGrace, CollectorViewsFile::commit_grace_ms and --collector-export-interval-ms / --collector-clock-skew-allowance-ms go. The collector's window_close_delay_ms capability stays as it declares it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1M6bo8kYWd83zXwh2Nobf
zzylol
added a commit
that referenced
this pull request
Nov 30, 2026
…close CollectorViewOptions gained idle_close_ms (#890); the collector-views file does not carry the collector's close delay (a new field would be refused by readers that deny unknown fields), so the options it gives take the default 6 s + 2 s. 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
docs/design/collector-sketch-ingest.md, §4 and §6).common::ViewStateBatch: a request's collector states, nested as the OTAP tiers (view → series → records).otlp: one walk, branching at the metric. A metric whose metadata carries the view identity (asap.plan_id,asap.node_id,asap.view_state_key) and whose name is<metric>.asap_view.<node_id>gives states: labels from the raw path's label function (resource attributes as Prometheus does, from fix(otlp): OTLP/HTTP replies, Prometheus resource-attribute labels, DELTA sums rejected, in-place decoder #887), window(start, time], ASAPv1 bytes fromsketch.envelope,count. Every other metric gives samples, as before.precompute: views listed inPrecomputeOptions::collectorare collector views. Each is a refresh group of its own that no run computes. A state is checked, decoded into the view's kernel withstorage's ASAPv1 codec, staged per(view, series, window), and committed through the precompute committer when the request ends (no commit grace); the request answers once its windows are committed. A later state of a committed window merges into it through feat(precompute): merge late samples into committed windows within retention #892's late merge.Restack (2026-11-30, 2nd) onto #892 5da5b6c, at b7b9312
Ingestion::new: both PRs split groups. The order-sensitive split runs first, thensplit_collector_views. Both functions are kept.Restack (2026-11-30) onto #892 0867ce6, at 742e799
-D warningsand fmt clean. Passing: storage 52, precompute 12, data_plane collector_views 13, ingest_shards 17, ingest_protocols 6, push_precompute 16, server 10, window_levels 4, planner_executor_parity 6.Fix 2b (2026-11-30), at 8411b5b
CollectorViewOptions::idle_close_ms(default 8 s: the collector's 6 s close delay plus a 2 s skew allowance).idle_closes_at.windows_of_a_stopped_collector_close_by_the_clock. With a manual clock, the collector stops 30 s before the query time.collector_views11,ingest_shards17,ingest_protocols6,precomputelib 12.Follow-ups (2026-11-30), at cd13693, on #892 3b3eaac
emptyand not stored. Every range over a feed gap then failed with "materialized view 1 has no rows tiling" (HTTP 422), while the ASAPQuery-backend-only arm stores its idle windows empty and answers.empty). States or corrections that come later merge into it.a_feed_gap_is_stored_empty_and_answered. A 30 s gap (six 5 s windows) failed with 422; now q01 over the gap equals the answer of a data plane that built the view from the same samples.bad_states_…_is_missingbecomesbad_states_…_is_counted.a_correction_state_merges_into_its_emitted_window: a state of a window's late samples alone, sent after the window was emitted, merges (late_merged), and the answer equals on-time arrival. Sent again, it is aduplicate.Review guide
feat/late-merge-committed-windows(feat(precompute): merge late samples into committed windows within retention #892, on feat(precompute): close an idle stream's last windows by wall-clock time #889 → chore: range step cap in the query engine, one plan test helper, QueryOutcome as Result #888 → fix(otlp): OTLP/HTTP replies, Prometheus resource-attribute labels, DELTA sums rejected, in-place decoder #887 → chore: pin ASAPPlanner 566b35c and its asap_sketchlib d050037 (view format 5) #886). Restacked again on 2026-11-29 onto feat(precompute): merge late samples into committed windows within retention #892 8f5588f (counter recompute, window insert, routing wait); then the lagging-collector follow-up, test first. Stacked draft; the next PR (control plane rule,--collector-views) stacks on this one. Collector view groups do not count toward feat(precompute): close an idle stream's last windows by wall-clock time #889's idle-close flush.feat(ingest): collector view states over OTLP…. Its message lists them.commit windows on arrival; later states merge within retention(approved change). It is described in "Commit on arrival" below.crates/precompute/src/collector.rs: the checks (CollectorViews::check), staging (Staging::stage: hash set, merge, late), rows (CollectorViews::rows).crates/precompute/src/ingestion.rs:split_collector_views,start_collector_group, and the close loopclose_windows_at(collector groups close bynow − grace; a group reading one closes only behind it).crates/precompute/src/engine.rs:InstalledPrecompute::ingest_collector_states,Command::CollectorStateson the coordinator,PrecomputeJob::CollectorandBuiltByin the committer.crates/adapters/ingest/otlp/src/lib.rs:Walk::view_of,Walk::state_point.storage::persist::Asapv1Decoder(wraps the existingdecode_sketch), the metrics ininternal-metrics,data-planewiring (EngineOptions::collector,write_otlp),docs/design/repo-layout.md(otlp now depends oncommon).Commit on arrival (this restack)
Ingestion::collector_arrived,close_windows).ingest_collector_statesreturns once those windows, and the late merges queued before them, are committed: the coordinator queues a committer barrier per request.kept_after_ms):late_merged, sent to feat(precompute): merge late samples into committed windows within retention #892's late merge (PrecomputeJob::Latewith the states, made into rows on the committer);duplicate.late_dropped.Staging::committedkeeps the hash set per(window, series)of every committed window while it is kept. A resent state or request merges nothing twice, and a new series or partial merges.CollectorViewOptions::commit_grace_msand the clock start of a collector group: a group starts at the oldest window of its first states.close(now_ms)→close().insertset (feat(precompute): merge late samples into committed windows within retention #892'sViewStore::merge_late/replace_window). The wider windows read from it that closed meanwhile are computed again from the views as they then stand; if their first run failed on the missing window, they are inserted. Its states count aslate_merged; only a window past retention islate_dropped.Behavior: before → after
One series
data{job="a"}, planquantile_over_time(0.99, data[5m])with a DDSketch α 0.05 chain n1 (10 s windows), the collector building n1;POST /v1/metricswith metricdata.asap_view.1, metadata(plan id, 1, n1's key), one summary point per window withsketch.envelope:data.asap_view.1_sum/_count(a metric noScanreads){__name__="data", job="a"}(T−10 s, T]datasamples (n1 is their only reader)samples_unrouted)duplicatelate_merged); a repeat is aduplicate; past retention or never stored:late_droppedempty); later states merge into itother_plan,unknown_view,key_mismatch,window,decode), counted in the reply'spartial_success<metric>.asap_view.<node_id>,sketch.envelopeunder a plain metric/metricsgains, per view,asap_collector_states_total{outcome=staged|duplicate|merged|late_merged|late_dropped|expired},asap_collector_states_rejected_total{reason},asap_collector_states_windows_total{outcome=committed|empty}and the histogramasap_collector_states_arrival_delay_seconds; none is rendered before a state arrives.Design scope
PrecomputeOptions::collector(CollectorViewOptions { views }) already makes precompute skip the listed views and theScans only they read, because the ingest path cannot be tested without it. The next PR adds the file, the control plane rule and--collector-viewsthat set it.Ingestion::split_collector_views), compiled only for its output schema. Its windows close through the newest window a request staged, instead of by the raw watermark; a group reading it (a wider chain level) closes a window only once the collector group closed it, and one no metric starts starts with it. Plan order is kept (collector groups first within their planner group), soRefreshTaskGraphorders readers after them.PrecomputeJob::Collectorwith its staged states, takes a precompute slot and counts in the backlog like any window, and is committed bycommit_window(readers, persistence, memory budget,missing_onlyfor windows loaded from files). The view files' plan hash mixes in the collector views, since they change the group layout.create_planner_accumulatorfor the view's summary type, θ and input);Asapv1Decoder::of_statefinds the stored-form kernel of that empty state, anddecodeis the existingdecode_sketch. No sketch table is written here.reads_collector) close a window only behind every group they read; one no metric starts starts with the collector view, and one started earlier (by its metric or a stream start) skips to the collector view's first window, whichever starts first. A reader that also scans a metric holds that metric's raw samples until the collector's first state arrives./v1/metricsstages states before ingesting samples: a request refused (503) for either is retried whole, its states are then duplicates (ignored), and no sample is ingested twice.ingest_collector_statesis a method onInstalledPrecompute, next totry_ingest(the design namesPrecomputeEngine; the HTTP side holdsInstalledPrecompute).Deviations from the design document (to fold into #885)
ViewStateRecordcarrieswindow_start_mstoo: a state whose start is notend − widthis rejected (window).key_mismatch(key differs from the node's; the design folds it intounknown_view),name(a series'__name__is not the view'sScanmetric) andmerge(a state that does not merge with the staged one). A name without the.asap_view.<node_id>suffix of its identity is refused by the adapter (400) with the other identity errors.ingest_collector_statesisBusy(503) while the precompute backlog is full, as samples get 503 once the queues fill.view="unknown".expired, notlate_dropped.Interfaces
crates/common/src/view_states.rscrates/adapters/ingest/otlp/src/lib.rspub struct Decoded<S> { pub samples: Vec<S>, pub rejected_points: u64, pub dropped_no_value_points: u64, + pub view_states: ViewStateBatch, } pub enum OtlpError { + ViewIdentity { metric: String, reason: String }, }crates/precompute/src/collector.rs,engine.rscrates/storage/src/segment.rsThe view store's window charge is now
Batch::stored_bytes(every state column in full) less shared texts, for appended and read-back windows alike; the separate state-byte countreadreturned is gone.crates/storage/src/persist.rscrates/data-plane/src/engine.rspub struct EngineOptions { + pub collector: CollectorViewOptions, } impl EngineHandle { + pub async fn ingest_collector_states(&self, batch: ViewStateBatch) -> Result<CollectorStateIngestReport, IngestError>; }internal_metrics::Metricsgainscollector_states: CollectorStateMetrics.Usage
crates/data-plane/tests/collector_views.rs::collector_states_answer_as_the_view_built_here, run at this commit:Tests
Test bodies were written from the design before running, and failed first on two real gaps: the chain's
window_endcolumn, and a wider level reading a collector view never starting. Test data: the OTLP bodies are built as the collector's OTAP codec (asap-precompute-rs/src/otap/codec.rs) writes a summary point, with the identity in metric metadata as the design specifies (the collector's metadata and window-boundary changes are its own steps 7–8, not merged yet, so no captured body has this format), and the states areasap_sketchlibDdSketchASAPv1 bytes at the backend's pinned revision.otlp(unit): a view metric's points become states labeled as raw samples (and a raw gauge in the same request stays a sample); states group by view then series; bad identity, name or envelope refuse the request.precompute::collector(unit)windows_close_through_the_newest_staged_and_later_states_merge: a request's windows close in any order through its newest; later states of a committed window merge unless repeated; a window closed without states takes none later (late_dropped).precompute::collector(unit)a_collector_window_is_charged_as_the_computed_window_of_its_samples: a collector window and the window the view's run seals from the same samples (50 series × 60 samples, DDSketch) take equal view-store bytes. Before the fix (decoded states kept as kernel objects) 30,840 B vs 10,348 B, the 2.8× of the collector e2e run; after, equal (states in the view layout,storage::segment::with_view_layout_states).data-plane/tests/collector_views.rs(end to end,/v1/metrics):data's raw samples are not stored;late_dropped;states_of_one_window_in_two_requests_answer_as_one_request: joba's states, then jobb's in a second request. The answer read right after the second request equals the one-request answer, withlate_mergedequal to jobb's states.a_request_sent_twice_counts_once: every state of the second request is aduplicate, and the answer is unchanged.a_window_answers_once_its_request_returns: windows that ended under 10 s ago are queryable right after the request returns.a_window_whose_first_states_come_after_a_later_windows_is_stored. All windows but one three windows back are sent first; that window's states come in a later request. On the leveled plan, the window is stored behind the newest and the wider level is rebuilt. The answer equals one data plane's that got every state on time, with nolate_dropped.Gate (base chore: range step cap in the query engine, one plan test helper, QueryOutcome as Result #888 b192642 before the restack onto feat(precompute): close an idle stream's last windows by wall-clock time #889; rerun on feat(precompute): close an idle stream's last windows by wall-clock time #889 below):
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspace(ulimit -n 65536): 256 passed, 0 failed, 3 ignored (the base plus 8 new).On feat(precompute): close an idle stream's last windows by wall-clock time #889: gate 259 passed, 0 failed, 3 ignored (feat(precompute): close an idle stream's last windows by wall-clock time #889 plus 8 new), fmt and clippy clean; parity dump vs feat(precompute): close an idle stream's last windows by wall-clock time #889 byte-identical (70,736 B). The last commit (OTLP raw-path trim, after a 3 %
decode_benchslowdown showed on feat(precompute): close an idle stream's last windows by wall-clock time #889) is covered bycargo test -p otlp,data_plane --test ingest_protocols --test collector_views, clippy and a final parity run (identical).decode_benchvs feat(precompute): close an idle stream's last windows by wall-clock time #889 at this head, 6 alternating rounds, pinned core: OTLP 0.109–0.112 vs 0.113–0.116 µs/sample (one series per sample), 0.080–0.081 vs 0.081–0.082 (100 per series); Remote Write 0.104 vs 0.104–0.105.ingest_benchon feat(precompute): close an idle stream's last windows by wall-clock time #889: windows refreshed after 0.88–0.89 s on both (first cold runs excepted).Parity dump vs the base with no collector input (raw RW/OTLP, sum and DDSketch quantile, forward and no-forward,
/metrics): byte-identical, 69,468 B.Benchmarks vs the base, alternating, 3 rounds:
decode_bench(pinned core): Remote Write 0.104–0.107 vs 0.104–0.105 µs/sample, OTLP 0.112 vs 0.111 µs/sample (one series per sample), OTLP 0.080 vs 0.080 (100 samples per series): unchanged.ingest_bench 1000 120 views: every window refreshed after 0.88–0.89 s vs 0.89–0.90 s (one cold first run of the new tree at 4.03 s; the same cold outlier showed on the base tree in an earlier round), writes acknowledged in 0.03 s on both: no regression without collector input.Restack gate (2026-11-29, tests of changed code only):
cargo fmt --all --checkandcargo clippy --workspace --all-targets --locked -D warnings: clean.precomputelib 12,storagelib 45,otlp17.data_planeintegration:collector_views7 (3 runs),ingest_shards15,ingest_protocols6,server10.Follow-up gate (2026-11-29, at 6d57168, on feat(precompute): merge late samples into committed windows within retention #892 8f5588f):
cargo clippy --workspace --all-targets -D warningsand fmt: clean.precomputelib 12;collector_views8 (the lagging test failed at its own commit and passes at the implementation);ingest_shards17.Open questions
(e − w, e]windows, raw-forward filter) are ASAPCollector-public's; the end-to-end comparison with a real collector (design step 5) follows them.