Skip to content

refactor(metrics): remove unused collector bookkeeping - #31333

Closed
XuPeng-SH wants to merge 3 commits into
mainfrom
codex/batchpipe-unused-state-20261026
Closed

XuPeng-SH wants to merge 3 commits into
mainfrom
codex/batchpipe-unused-state-20261026

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Refs #29249

What this PR does / why we need it:

Remove unused bookkeeping in the metric collection and descriptor conversion paths:

  • BaseBatchPipe.dropped has no reader, metric or diagnostic consumer. Remove its ignored atomic increment while keeping the nonblocking default arm: a full input queue still discards excess items and returns nil.
  • descExtra.orig retains the input descriptor but is never read. Keep the existing name/label extraction and generated metric views unchanged.
  • The batchpipe test collector's notification callback is permanently nil. Remove its field and unreachable call without changing any maintained test case, body or assertion.

Start/Stop admission, cancellation, locking, queue metrics, worker behavior, descriptor parsing and schema generation remain unchanged.

Validation (Go 1.27.1, controlled native wrapper):

  • Full mometric package: 12 top-level tests / 13 named cases pass, no skips, including both real collectors and schema generation. The existing descriptor test passes before/after.
  • Unchanged batchpipe evidence remains valid: six normal tests, six race tests, and a before/after one-slot send-boundary probe covering six subcases, including 100 race repetitions.
  • Incremental gofmt, vet, pinned molint and configured golangci-lint pass for both packages.
  • Whole-tracked ownership audit parses 6,824 Go files with no errors. Exact source comparison closes the dead-field removals; all maintained test bodies and assertions are preserved.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH

XuPeng-SH commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · superseded

Commit: fba6150ddff2b3fe734cbd5426b6d5b0b8ada1ba

"interrupted"

@XuPeng-SH
XuPeng-SH requested a review from aptend as a code owner October 26, 2026 21:40
@XuPeng-SH XuPeng-SH changed the title refactor(batchpipe): remove unread drop bookkeeping refactor(metrics): remove unused collector bookkeeping Oct 26, 2026
@XuPeng-SH

XuPeng-SH commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: 36b140d66e1435ce3de6933d033c6f45340951a8

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: 36b140d66e1435ce3de6933d033c6f45340951a8

Assessment: approve

Reviewed the complete delta and callers. The removed fields have no consumers, and the test callback is never assigned. Existing owners, nonblocking overflow behavior, synchronization, descriptor extraction and schema generation remain intact. This is a coherent cleanup with no actionable findings. The earlier bot notice describes interrupted work, not approval.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1

Validation:

  • Full batchpipe and mometric suites passed: 18 top-level tests, 19 named PASS events, no skips. Batchpipe also passed under race instrumentation.

  • Six admission-boundary cases passed on head and the frozen-base overlay. The exact admission test passed 100 race repetitions, including concurrent sends into a full queue.

  • Source comparison confirmed maintained test bodies and assertions are unchanged. gofmt, go vet and diff whitespace checks passed.

  • Five-sample benchmarks measured median base→head times of 19.36→19.16 ns for accepted sends, 5.940→5.538 ns for saturated sends, and 40.50→15.65 ns for parallel saturated sends. All measured zero allocations.

  • Preflight and native provenance verification passed with 192 matching native inputs. Eleven receipt/log pairs were audited in /home/xupeng/.local/state/mo-bot/jobs/a8f35e61a75fd2e4c052fd23/attempt-1/review-evidence.json. Source remained unchanged.

  • discussion-assessment.json accounts for all three frozen discussion items; none contains a substantive finding or rebuttal.

Limitations:

  • Benchmarks cover a one-slot admission helper, not end-to-end SQL throughput or production overload.

  • No live-server BVT, full CI or full mometric race run was performed; external SQL/protocol behavior and descriptor synchronization are unchanged.

  • Author-reported earlier runs and pinned lint results lack retained evidence and were not counted as independently verified. The linked issue body was absent from frozen evidence.

XuPeng-SH added a commit that referenced this pull request Oct 27, 2026
## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [x] Code Refactoring

## Which issue(s) this PR fixes:

Refs #29249

## What this PR does / why we need it:

Remove unused helpers, duplicate bookkeeping and transient state whose
consumers have already been retired. This consolidates the 19 closed
cleanup PRs into one reviewable change on current main; each affected
file matches its original published PR, with no additional cleanup.

The cleanup covers TAE task/logstore/merge/RPC helpers, HAKeeper replica
views, obsolete ETL writer and path state, batch/vector constructors,
RPC client bookkeeping, metrics/CDC/fulltext state, MongoScan, message
receivers, fixture helpers and interactive viewport state. Retained
execution, ownership, cancellation, parser/error, replay, plugin
registration and MySQL driver registration paths remain intact.

Supersedes #31325, #31327, #31329, #31331, #31332, #31333, #31334,
#31335, #31336, #31337, #31339, #31340, #31341, #31342, #31343, #31344,
#31345, #31346 and #31347. Already merged #31323/#31324 and Python SDK
#31322 are excluded.

Validation on the combined change: all 30 changed owning packages built;
28 ran tests, with 2,066 top-level / 4,580 named cases passing and two
existing external-data ETL tests skipped. The two support packages have
no tests. Existing component-level race, before/after probes and
consumer checks were reviewed for reuse. Formatting, go vet and
incremental golangci-lint passed; forced all-four-analyzer molint
reported six findings already reproduced at the baseline, with no new
findings. These are local focused checks, not a full CI or GPU run.
@XuPeng-SH
XuPeng-SH deleted the codex/batchpipe-unused-state-20261026 branch November 1, 2026 05:02

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor Code refactor size/XS Denotes a PR that changes [1, 9] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants