Skip to content

refactor(export): retire superseded SQL writer - #31332

Closed
XuPeng-SH wants to merge 2 commits into
mainfrom
codex/etl-sql-writer-retirement-20261026
Closed

XuPeng-SH wants to merge 2 commits into
mainfrom
codex/etl-sql-writer-retirement-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:

Retire the old DefaultSqlWriter implementation superseded by ContentWriter, including its unused constructor, buffer/flush methods and timeout constant. Simplify the writer factory's constant CSV-format selection while preserving both SQL-enabled and CSV-only modes. Update stale comments referencing the old writer.

Preserve the MySQL driver's live registration by moving its blank import into the existing active content.go file in the same ETL package. All SQL/CSV fallback, backoff, connection helpers, TAE readers/writers and configuration contracts remain unchanged.

Validation (Go 1.27.1, controlled native wrapper):

  • Full ETL, DB helper and export consumer suites: 60 top-level tests / 104 named cases pass. Two unchanged TAE tests requiring external data skip.
  • A minimal external before/after probe verifies one MySQL registration, both public factory modes and empty-flush behavior.
  • All 729 package dependency nodes and direct-import edges match before/after; registration initialization remains in the same package graph.
  • Incremental gofmt, vet, pinned molint and configured golangci-lint pass for the three packages. 64 retained declarations are AST-identical. The surviving source changes only the driver import, factory simplification and comments; DB test bodies and assertions are unchanged.

@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: 9e46065f575672b58901c758056b70468d44a45f

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: 9e46065f575672b58901c758056b70468d44a45f

Assessment: approve

The complete delta removes an unused implementation and an unreachable factory branch while retaining ContentWriter as the active SQL/fallback owner. Driver registration, both factory modes, cleanup and configuration contracts are preserved. No actionable findings remain. The benefit is reduced maintenance complexity; no runtime performance gain is claimed.

Model: gpt-6-astra / xhigh

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

Validation:

  • Full ETL, DB-helper and export suites passed: 60 top-level tests and 104 named PASS events. Receipt: checks/1793050946778318652-6.json; log: suites.log.

  • External consumer probes passed on head and the exact frozen-base overlay, verifying MySQL registration, both factory modes, empty flush and acknowledgement behavior. Logs: probe-head.log and probe-base.log.

  • gofmt, diff-check and go vet passed. All 1046 selected production dependency nodes and direct-import edges matched before/after. Active code introduces no additional per-row allocation, serialization, I/O or synchronization.

  • Isolation preflight and native provenance verification passed; 192 native inputs matched. Source remained unchanged. Seven receipt/log pairs were audited in /home/xupeng/.local/state/mo-bot/jobs/ef88a32171592b491412b946/attempt-1/review-evidence.json.

  • discussion-assessment.json accounts for both frozen discussion items. Both are informational; there are no substantive prior findings or rebuttals to reconcile.

Limitations:

  • Two unchanged TAE reader tests skipped because external fixtures were absent.

  • No live-server BVT, race stress or throughput benchmark was run; active SQL/protocol, lifecycle and per-row behavior are unchanged.

  • Author-reported pinned lint results lack retained execution evidence and were not counted as independently verified. Local static validation covered gofmt, diff-check and go vet.

  • The linked issue body was absent from frozen evidence; the explicit PR retirement and preservation contract was reviewed.

@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/etl-sql-writer-retirement-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/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants