Skip to content

refactor(hakeeper): retire obsolete replica views - #31331

Closed
XuPeng-SH wants to merge 1 commit into
mainfrom
codex/hakeeper-replica-view-cleanup-20261026
Closed

XuPeng-SH wants to merge 1 commit into
mainfrom
codex/hakeeper-replica-view-cleanup-20261026

Conversation

@XuPeng-SH

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 an unused controller replica projection and the checker tuple's never-populated epoch field. The coordinator continues using GetExecutingReplicas and GetNonVotingExecutingReplicas; real epochs remain owned by protobuf shard/replica information and operator steps.

Keep all scheduling, stale-epoch/zombie/incarnation checks and command generation unchanged. Convert five existing private replica expectations to keyed literals, retaining every live expected value and assertion.

Validation (Go 1.27.1, controlled native wrapper):

  • Full operator, logservice checker and coordinator packages: 55 top-level tests / 103 named cases pass, with no skips or failures.
  • A minimal external before/after probe checks real Dispatch and exact voting/non-voting/bootstrap views.
  • Incremental gofmt, vet, pinned molint and configured golangci-lint pass for the two owners and coordinator consumer.
  • Source evidence confirms 38 retained declarations are AST-identical; the test file differs only by the five documented literal transformations.

@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 · done

Commit: 0b0aa11469c01b464560496311a6c58f99bf3e87

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: 0b0aa11469c01b464560496311a6c58f99bf3e87

Assessment: approve

The complete delta is a coherent cleanup: the deleted getter has no repository callers, the private epoch field was unused, and authoritative scheduling and epoch checks remain unchanged. All five test conversions preserve their live values and assertions. No actionable defects or substantive discussion disputes remain. Expected savings are limited to smaller checker tuples; no performance improvement was measured.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1

Validation:

  • Go 1.27.1: operator, logservice checker and coordinator packages passed with -count=1 using the supplied isolated executor: 55 top-level tests, 103 named cases, no failures or skips.

  • Isolation preflight, current-input native provenance verification, go vet, gofmt and git diff --check passed.

  • Source audit verified that retained production functions are unchanged and the test file differs only by the five specified literal conversions. Checkout remained clean.

  • Commands, source fingerprints, exit receipts, retained log hashes and named results are reconciled in /home/xupeng/.local/state/mo-bot/jobs/c66183b39c9738c9ec773734/attempt-1/validation-summary.json.

  • Complete frozen discussion accounted for in discussion-assessment.json in the same directory; both entries are informational.

Limitations:

  • Frozen CI was pending; author-only probe and lint claims were not counted as verified execution.

  • Referenced issue #29249's body was not supplied. Assessment covers the explicit behavior-preserving cleanup contract.

  • No race, SQL BVT or benchmark run: synchronization, public behavior and live execution paths are unchanged.

@XuPeng-SH XuPeng-SH closed this Oct 27, 2026
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/hakeeper-replica-view-cleanup-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/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants