Repository navigation
perf: streamline pipeline decoding and heartbeat replicas - #32918
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
This pull request is merged. |
|
mo-bot review · Commit: "interrupted" |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 501f1b3af05e335ad94101a898688112dfc7c2af
Assessment: approve
Pipeline decoding reuses the validated batch boundary and delegates vector reset to the existing decoder. LogService reserves space for exactly the ready replicas in its existing snapshot, preserving heartbeat contents and order.
Model: gpt-6.2-sol / xhigh
Session: 01a1f0a0-5126-78f3-9ab8-ef4e87f2f119 · slot 0 · generation 3
Validation:
-
Eight focused compile tests passed on the assigned head, covering sender framing, receiver admission, and provenance cleanup after a grouping error.
-
The full batch, LogService, and HAKeeper suites passed on the earlier PR head. Dependency comparison confirmed that the rebase changed none of the inputs to those runs.
-
Five serial samples per revision showed unchanged pipeline allocation counts. Median decode time fell about 4–5% in the plain cases and was nearly unchanged with grouped v2 provenance.
-
With nine ready replicas, the real-store heartbeat benchmark fell from 7,453 to 4,267 bytes and from 21 to 17 allocations per operation. The one-replica control stayed at 536 bytes and 13 allocations.
-
The source remained clean. All current and reused receipts are indexed in validation-reconciliation.json.
Limitations:
-
The initial batch benchmarks overlapped with compilation. The timing comparison uses the serial rerun.
-
The benchmarks measure local components. Distributed BVT was still in progress in the frozen CI snapshot.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32278 (C09 and C25; the umbrella issue remains open).
What this PR does / why we need it:
Pipeline batch decoding currently walks the stable envelope to find the grouping boundary and repeats the same framing walk while decoding provenance. Reuse the validated boundary while retaining the checked stable decoder, the existing provenance/grouping validation, and the wire format. Vector decoding already clears grouping on receiver reuse, so remove the redundant second reset.
Build LogService heartbeat replica slices with one exact reservation after the first ready shard. A bounded scan counts the remaining ready shards; empty and all-pending snapshots retain the existing empty slice without allocating a backing array. Pending filtering, order, epoch checks, maps, and protobuf output are unchanged. This adds one scan of the remaining shard snapshot when at least one shard is ready.
On the same local Go toolchain and Apple M4, seven-sample pipeline benchmarks retained the same allocation counts and showed small CPU reductions; five-sample new-receiver and grouped-provenance controls showed no allocation increase. A five-sample real-store heartbeat benchmark with eight additional ready shards went from 19 to 16 allocations and 3,737 to 2,729 B/op. These are local microbenchmarks, not production latency measurements.
Validation: