Repository navigation
fix: isolate POST metadata cache keys and serve labels alias - #949
Conversation
⚪ Performance A/B: no change beyond noise56 shape×range — 56 ⚪ same · results vs Loki: 49 same, 0 new difference(s), 7 pre-existing Loki profiles compared (like for like):
Every shape is within noise of the base build (±30% and 100 ms). 56 unchanged shape×range (within noise)
Cold (first-run) timings — what a user opening a panel sees
† Loki's results cache answered this cold run (its own counters, or identical answers for windows a minute apart): not a computed time, so it is in no ratio. ↺ Loki cold taken from the first set that ran the same query; Loki's cache answered this one. Why these shapes
base |
12f78e8 to
32241eb
Compare
✅ Visual smoke: passedBase
Gate: a base-vs-PR data difference passes when the PR is closer to Loki, and fails when the PR diverges from Loki or Loki cannot decide it (at a range Loki does not hold, a difference passes when the same page proved that query to answer like Loki at a shorter range; otherwise label the pull request Core set montages (9): base | PR | Lokidd-fields-1h dd-landing-1h dd-service-logs-1h explore-logs-plain-1h explore-metric-plain-1h explore-sum-by-over-binary-1h explore-topk-by-per-step-1h explore-unwrap-sum-1h lvl-explore-rate-errors-by-service-1h Published inline montages: |
PR Quality ReportCompared with the PR base commit; measurements below are scoped to their linked run. Base 4c5b769 → PR 8772864; tested merge 51a5dc7. Focus signals:
Main-versus-PR whole-process CPU, peak RSS, physical SSD throughput/IOPS and per-layer evictions are not measured here. Synthetic allocations and fleet cache occupancy do not substitute for them. Evidence sources and revision status
Pending, stale, unavailable and skipped sources contribute no measurements. Coverage and tests
Test count includes passing Go test/subtest events, not independent scenarios. Current CI: 21202 passed, 0 failed, 72 skipped, 2984 top level passed, 18218 subtests passed, 11 packages. API contract coverage and regression changesExact Go case outcomes from the existing quality test run. Top-level tests and subtests are separate populations; package + full test name defines identity.
Showing 6/6 rows.
Showing 20/36 rows. Per-package covered/total instrumented statements; missing packages or snapshots have no coverage delta. Coverage changes also reflect changes in the statement denominator.
Showing 16/16 rows. Declared conformance inventory, not full runtime compatibility. Registry states describe the checked-in contract and proof links; these counts do not certify that every endpoint, version or workload ran successfully. Loki surface version: v3.7.7 → v3.7.7. Read API scope: write endpoints are excluded and deletion management is reported separately. POST query transports remain reads. Mixed rule endpoints retain their read methods after registry exclusions. Deprecated read aliases are excluded by owner scope decision; this changes the denominator without proving a compatibility gain.
Showing 4/4 rows.
Showing 6/6 rows.
Showing 12/12 rows.
Showing 7/7 rows.
Showing 1/1 rows. Selected smoke component checks against the candidate backend only. Both quality snapshot invocations share that backend image, so these checks provide no runtime comparison between revisions. Use the real workload A/B evidence for separately built revisions. This is a small contract sample, not the full declared inventory or version matrix.
Showing 18/18 rows. Broader API and Grafana execution scopesExisting CI job logs, verified against the tested revision. Candidate only: these scopes have no paired base run here. Go counts include top-level cases and subtests; repeated identities count once and a failed repeat stays failed. Playwright invocations remain separate. Do not sum profiles as independent API coverage. Failed jobs can contain only partial observed populations.
Showing 17/17 scopes; source links are above. Real workload A/B: base, PR and LokiSelected shape × range × Loki profile rows; not the complete workload baseline.
Showing 20/56 rows; full details remain in the linked A/B artifact/comment. † Loki's cache answered cold; not a computed cold comparison. Not-like-for-like rows are not speedup proof.
Docker CPU percentages sampled within ±1.5s of each request, maximum across that row's runs. Overlapping work and background activity can contribute; these are not query-attributable CPU seconds. This summary's zero may also mean missing samples. Distributed cache: candidate onlyCurrent PR candidate only. RF1/RF2 are different configurations, not main/PR comparison. First/repeat populations follow each fleet phase; first is not always cold VL.
Showing 16/216 layer rows; full report in CI artifact.
CPU seconds are sampled process-counter deltas within a phase, including background activity. RSS peaks belong to each sampled replica, not a simultaneous fleet-wide peak. Occupancy uses Loki-facing l1_memory/l2_disk counters; VL-facing cache occupancy is unmeasured here. Logical cache bytes are not physical disk I/O or process memory. Resources have no main-versus-PR delta.
Request-counter sums across each shown phase/layer/replica, including first and repeat requests. Showing 16/216 groups, disk-loss/restart and owner-loss phases first. Fleet VL calls exclude background calls; background is listed separately. These counters are not physical disk reads or throughput. Full routes and inventory-unit attribution remain in the artifact.
Existing docker stats samples from the candidate fleet's Loki/VL containers; CPU is Docker percentage, not CPU seconds or a main/PR delta. Memory is sampled container usage, not proxy RSS. Synthetic handler microbenchmarksSynthetic handler elapsed time and allocations; not process CPU, RSS or physical disk I/O. Repeated-sample medians.
Labels follow the existing gate percentage, absolute and low-baseline guards, including pooled-path allowances. CI regression checks
Showing 52/52 checks; failed and pending checks first. Full job lists remain in the linked runs. Required checks decide merge safety. This report summarizes selected evidence; rendering starts no tests or heavy workloads. |
d1367e2 to
d4e732b
Compare
d4e732b to
30f8c06
Compare
30f8c06 to
8772864
Compare









POST metadata reads could cache a body-filtered answer under a URL-only key. A later POST for a different app could then return the previous app's labels. This change keys effective form parameters, preserves body precedence and fences the affected old namespaces across RAM, disk, peers and the outer compatibility cache. It also serves
GET/POST /loki/api/v1/labeldirectly through the existing labels handler.The read-scope/reporting changes from #948 are merged. This PR is rebased onto main at
4c5b769f96f1630dd69854449dd0e0f1872b1859; its diff contains only the alias, POST cache correction, regression tests and supporting evidence/docs.Historical main versus PR evidence
Retained results, method and limits, harness and isolated compose. Historical measured main runtime:
28a5a2f6994240d85d254b5daa23dbc04ecfd891; candidate runtime:c320190c3b2cda0137b36518491e406bbc8835d3. This capture predates #947. The branch is now rebased onto main at4c5b769(including v2.54.0 and #948) and includes its S2 ownership change. These rows retain their original measured identities and are not measurements of the rebased head. Reference: Loki 3.7.9 and VictoriaLogs 1.52.0, the same dual-writtenTestSetup_IngestLogsfixture and a fixed one-hour selector window.The counter rows are one dedicated sequence, including prior endpoint-test priming. They are not a cold latency benchmark, per-tier hit ratios or physical disk operations. The empty-selector raw response differs in an existing way: Loki omits
data; the proxy returnsdata: [].Tenant/auth and backend scoping, existing freshness/completeness rules and configured capacities are preserved. POST skips the URL-only key memo and copies the parsed form for normalization. The old-key fence applies to upgraded binaries; it is not a distributed deletion-invalidation protocol.
cache/generation_numbersremains unimplemented.index/shardsstays a counted optional planner-only gap; it does not block ordinary pinned Grafana/Drilldown queries or peer-cache lookup.Verification
go test ./... -count=1: passed, including the proxy package (310 s). After rebasing onto perf: release oversized S2 cache backing buffers #947, focused race tests including POST/alias/tenant/compatibility regressions, stats extents and S2 disk-queue/restart tests passed (26.9 s). Full CI reruns on the updated head.-raceregressions: passed for POST form identities, selectors/windows, alias routing, old namespaces, compatibility cache and tenant/auth isolation. A malformed partial-form case also passes.TestCompat_LabelsSingularAlias: passed against the committed candidate image and Loki, including nonempty direct GET/POST parity and a second empty selector. It runs in the existingTestCompat_.*core shard.The retained harness is manually reproducible; it adds no CI workload solely for the PR comment. Existing product compatibility, visual smoke and regression workflows provide the CI evidence.
The README and four curated API-status blocks are regenerated and checked by the existing conformance gate. This tree shows 25/27 routed reads, 19/27 with differential evidence and 12/27 declared proven; the parent scope/report PR shows 24/27, 18/27 and 11/27. The singular alias leaves the missing-route list only in this product PR. Known Issues records the POST collision in the parent and the tested correction here. Optional deletion remains outside the read score; generation_numbers remains unimplemented and index/shards optional.
Release audit after v2.54.0: the released changelog is unchanged byte-for-byte; the POST/alias and security notes remain under Unreleased. Runtime source is unchanged by the docs/release rebases. The latest local pinned Gitleaks run before the release rebase scanned 101 available commits with no leaks; remote full-history checks rerun on the updated head. The report string-construction quality finding is fixed in the shared parent using explicit concatenation, with unchanged rendered output.
Conflict-resolution verification (2026-11-01): rebased only the five product commits onto merged #948. The resulting file tree is byte-for-byte identical to the previous PR head. Fresh focused POST/alias race regressions passed (36 tests); conformance and changelog gates passed; all five rebased commits have valid signatures. CI reruns on the updated head.