Repository navigation
fix(load): close ETL readers after prescans - #30407
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? |
77a1ad4 to
874da53
Compare
|
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: 874da53264c00aff1f208baf22fd84b8b26b55c8
Assessment: approve
Reviewed the complete four-file delta and affected owners/callers. The acquisition-site defer correctly closes the prescan reader across success and failure paths without changing offsets or errors. Cleanup remains with the existing owner; no additional state or abstraction is needed. The tests provide meaningful ownership and error coverage. No actionable defects remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Both owning packages passed on Linux amd64, Go 1.27.1, with -count=1, -vet=all and the supplied isolated test executor. All 17 new prescan scenarios passed.
-
Base-code control reproduced six zero-Close failures; the failed-acquisition control passed. The candidate passed those same scenarios.
-
Isolation preflight, gofmt, diff checks and clean-source verification passed. Native prerequisites were built through the repository Makefile; 198 input hashes and 56 artifact hashes were verified.
-
Commands, frozen-source fingerprints, terminal receipts and retained logs were reconciled in /home/xupeng/.local/state/mo-bot/jobs/cbed481d9ae4075302727396/attempt-1/validation-index.json. Complete review reasoning is retained in review-map.json.
Limitations:
-
The MinIO integration test skipped locally because its binary was unavailable; both download attempts returned HTTP 410. The author reports a passing run, but no retained transcript was supplied. The fixture-only context change matches production Prepare by inspection.
-
Remote-storage reporter verification remains outstanding. The separate #30394 issue body was absent; its contract was assessed from the supplied PR description.
-
No throughput benchmark or race stress was run: the change adds one necessary synchronous close per eligible prescan, with no new shared state or work on unrelated SQL paths. Two unrelated planner cases also skipped.
Merge Queue Status
This pull request spent 1 hour 41 minutes 5 seconds in the queue, with no time running CI. ReasonPull request #30407 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
…6388bd09838f82262c8cd099f52d60c4f409639
|
补齐此前缺失的 MinIO 验证(2026-10-17):main
完整 external 包普通/race 的 prescan/close 断言也已通过。#30394 已转 @Ariznawlll,保持现有转测状态。 |
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
LOAD DATA ignored-line prescans leaked the reader returned by the ETL file service. Repeated loads could retain open files or remote streams.
Close the original reader on every return after successful acquisition, including normal scans, EOF, parser initialization errors, read errors and cancellation. Preserve offsets, scan errors and the existing read-only cleanup convention for Close errors.
Keep regression coverage for parallel tail-probe readers as well. Current official main already closes those readers; this PR preserves its line-terminator handling, error propagation and file-end split behavior without adding another Close. The prescan test fixtures follow main's SQL file-access policy. Also bind that policy in the existing direct Arrow/MinIO reader fixture, which bypasses Prepare, preserving its object-replacement and allocation-cleanup assertions.
The two close-tracking tests use real local ETL file services and cover 17 scenarios, including partial reads, multiple probes, no-probe operation and failed later acquisition. They check offsets/errors, exactly-once cleanup and closing each probe before opening the next.
Rebased onto official main
4e325495984c5f8a8dbf15500caa086d9e9159d1.Validation on macOS arm64, Go 1.27.1:
mo-cgo-test.pkg/sql/planandpkg/sql/colexec/externalpackage tests passed throughmo-cgo-test -count=1 -timeout=300s.go vet, gofmt andgolangci-lintfor both packages passed.No SQL results, API or file formats change. External remote-storage services remain unverified locally; the local MinIO regression passed and new-head CI is pending. Reporter verification remains needed after merge, and the issue should stay open until that verification.