Skip to content

refactor(tae): retire obsolete batchstore append state - #31329

Closed
XuPeng-SH wants to merge 1 commit into
mainfrom
codex/batchstore-append-state-20261026
Closed

XuPeng-SH wants to merge 1 commit into
mainfrom
codex/batchstore-append-state-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 obsolete append bookkeeping from the batchstore driver: an unused rotated-file return, its unread retained pointer, and a buffer-position snapshot feeding only a dead appender counter. Drop the associated commented examples of the superseded buffer path.

Keep the existing file/offset owners, live buffer cursor, write/sync/rotation/commit ordering, error propagation, replay and persisted record formats. No interfaces or maintained tests change.

Validation with Go 1.27.1 and the controlled native test wrapper:

  • Full owning package TestDriver passes normally and under race, including concurrent append/read/truncate, rotation and replay from the same store directory after restart.
  • Real WAL consumer tests TestReplay and TestTruncate pass normally and under race.
  • A minimal external before/after probe preserves the original checker error and nil address on failed admission.
  • Incremental gofmt, vet, pinned molint and configured golangci-lint pass for batchstoredriver and WAL.

@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: b1aa9f43e85305abb018372cded9b2d43b9556c9

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: b1aa9f43e85305abb018372cded9b2d43b9556c9

Assessment: approve

Reviewed the complete three-file delta and its append, rotation, sync, replay and cleanup callers. Removing unread state at the existing owners is a coherent simplification: live buffer accounting, file ownership, synchronization, error propagation and persisted formats remain unchanged. It removes bookkeeping without adding runtime work. No actionable defects or substantive discussion disputes remain.

Model: gpt-6-astra / xhigh

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

Validation:

  • Normal and race runs passed TestDriver, TestReviewRejectedAppend, WAL TestReplay and TestTruncate: four tests per run, no skips or failures. Receipts: 1793047544015470476-15.json and 1793047570208577409-13.json; retained logs: normal.jsonl and race.jsonl.

  • The rejected-admission probe also passed against all three frozen-base files, preserving error identity, nil address and unchanged rotation/file state. Receipt: 1793047520152766638-13.json; log: base-probe.jsonl.

  • Targeted go vet passed. Preflight passed, and the current repository provenance tool verified compatible retained native inputs before testing.

  • Final audit confirmed the exact head, unchanged source, complete delta, formatting, overlay contents and command/source/exit receipts. Receipt: 1793047749652584726-3.json.

  • Both frozen discussion items were read and classified as informational. Evidence and receipt/log hashes are retained in /home/xupeng/.local/state/mo-bot/jobs/d8c92fbb21aa42470be149be/attempt-1/validation-manifest.json, with discussion-assessment.json and review-notes.json alongside it.

Limitations:

  • Product CI was pending in the frozen snapshot. Author-only lint claims were not counted as independently verified execution evidence.

  • WAL TestReplay recreates its directory; actual same-directory replay coverage comes from the owning TestDriver.

  • No performance benchmark or SQL suite was run. The expected gain is modest bookkeeping reduction; no throughput improvement is claimed.

  • Separate issue #29249 text was absent from the supplied evidence; approval covers this PR's documented retirement contract.

@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/batchstore-append-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/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants