Repository navigation
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? |
|
Queue requested — the merge queue status continues in this comment ↓. |
|
mo-bot review · Commit: "interrupted" |
|
Fixed the EOF classification at Verification:
Scope: this is a bandwidth optimization, not a demonstrated fix for the 60s lock wait in #33435. The independent challenge's initial district object was below the 8 MiB offset threshold. Its 16 serial cold ranges at 15 ms added latency per GET were slower than a single whole-object fill; a restart need not leave a whole disk copy for an object-store outage. These trade-offs remain; no 4.2 backport or issue closure is implied. |
|
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: 74030b9e891069232d40cb66aa4f44c40eedd7a8
Assessment: request_changes
The narrow range-read design reuses the existing cache and storage paths, and the HTTP 416 handling passes the focused AWS and MinIO SDK tests. The change needs one correction for HDFS: an eligible past-end read no longer returns the file service’s required unexpected-EOF error.
Model: gpt-6.1-terra / max
Session: 01a22b07-00b6-7e32-b0a1-3099d0b867c7 · slot 1 · generation 39
- P2
pkg/fileservice/s3_fs.go:946: An HDFS-backed TP locking scan with both caches enabled requests an eligible small extent whose offset is beyond the end of the object.
Impact: The hinted read returns a generic invalid-offset error instead of ErrUnexpectedEOF, so callers cannot identify the truncated object using the documented FileService error contract.
Evidence: The new eligibility check includes HDFS, but HDFS.Read passes seek errors from readObjectRange through, and the HDFS client rejects seeks beyond the file size. The new normalization handles HTTP 416 only. The retained hdfs-short-read-probe.log uses an HDFS seek-behavior double: the ordinary control returned ErrUnexpectedEOF, while the hinted read returned 'invalid resulting offset'. Exclude this backend from the optimization or preserve the short-read error classification for its range reads, and cover the boundary in a regression test.
Validation:
-
Private /tmp and loopback preflight passed.
-
Four focused pkg/fileservice tests passed, covering eligibility, cache behavior, the ordinary full-object control, and mocked AWS and MinIO error paths.
-
TestScopeSmallExtentReadsOnlyForTPLockingSelect passed for TP and AP, locking and plain SELECT, DML, and stale-flag controls.
-
The simulated HDFS short-read probe reproduced the error-classification difference; it was an observational test, not a real HDFS service test.
-
git diff --check passed. Check receipts, source fingerprints, and retained logs are mapped in validation-audit.json.
Limitations:
-
A real HDFS service, end-to-end SQL workload, performance benchmark, and race run were not independently exercised.
-
The first Go test invocation did not run because the inherited toolchain setting selected Go 1.26.6; the focused tests passed after enabling the required toolchain.
|
Addressed the HDFS review at I independently replayed the original public NewS3FS fixture against a real Hadoop 3.4.1 NameNode/DataNode, using a 10 MiB object, fresh caches and the same 16-byte read at EOF-16, EOF-7, EOF and EOF+7, with and without the hint. On 74030b9 only hinted EOF+7 leaked “invalid resulting offset: 10485767” (7/8). At b28e9b0 both valid reads returned the expected bytes, all six short reads returned MO ErrUnexpectedEOF and zero bytes (8/8). The new deterministic regression test is red on the parent and green here; retained S3 range/416 tests, full fileservice -race and package static checks passed locally. This is a real file-service error-contract regression, not evidence of wrong SQL rows or of regular SQL generating out-of-bounds offsets. #33435 remains open; please wait for required CI and re-review. |
|
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: b28e9b0a74645167883f410811e9371184ecd6bf
Assessment: approve
The narrow range-read optimization reuses the existing scan, cache and storage paths. The prior HDFS short-read finding is resolved, and no actionable defects remain. The accepted trade-off is that eligible cold reads may issue more range requests and leave no whole-object disk copy; this change does not establish a fix for the linked timeout incident.
Model: gpt-6.1-terra / max
Session: 01a23504-137d-7f93-9b91-fd29f7f60fa2 · slot 1 · generation 42
Validation:
-
Private-runtime preflight passed, and native prerequisites built outside the checkout matched the frozen source inputs.
-
Focused normal and race-enabled tests passed for cache behavior, scan routing, AWS and MinIO error handling, and the HDFS short-read control.
-
A diagnostic scope-to-S3FS probe verified the requested bytes and cache behavior for TP locking, plain TP and AP controls.
-
The frozen diff passed whitespace validation. The review plan and discussion assessment were saved and verified, covering all eight discussion keys.
Limitations:
-
The integrated probe used a test reader and disk-backed object storage; it was not a production SQL or object-store workload.
-
The author's reported real-Hadoop and larger component comparisons were not independently repeated. No TPC-C result is claimed, and the linked incident remains open.
🚫 Left the queue · pull request merged manually1 h 8 min in the queue, with no time running CI. So far
Reason Pull request #33615 has been merged manually at 5496ca7 Tick the box to put this pull request back in the merge queue (same as
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Related to #33435. This removes one source of read amplification; it does not establish the cause of the reported 60s SQL timeouts. Narrow replacement for the closed, unmerged #33438.
What this PR does / why we need it:
A TP locking SELECT can need a single decoded column extent near the end of a large object. A cold miss can start a whole-object disk-cache fill even though the statement needs only a few KiB.
SkipFullFilePreloads, publish raw disk ranges, change cache keys/formats, or change deletion, restart, GC, or lock behavior. Ordinary reads keep their existing path. The HDFS backend also keeps its pre-PR path even when a TP locking scan sets the hint: a seek beyond EOF there is a backend error, not an HTTP 416.Validation
Compared the original main S3FS implementation at
f5fcac7488and this change using the same disk-backed object-store fixture, fresh caches, and a 96 MiB object. Read 16 nonoverlapping 43,229-byte extents starting at offset 93,644,241; verified every returned byte. Counted underlying reads and bytes consumed from their readers (not estimates from SQL metrics):New regression test fails on the baseline: it requests from offset zero to EOF. On the candidate, forced memory rejection produces two bounded reads and no new raw disk file/range; re-enabling admission gives a decoded-memory hit. An ordinary miss still fills the whole file and a subsequent eligible lock read hits that disk file without another object read.
SQL scope coverage: TP locking SELECT, ordinary TP SELECT, AP, and DML, including overwriting stale scan flags. Shape guards cover explicit policies, multiple entries, early, large, unknown-length, undecoded and streaming reads.
Local: full
pkg/fileservicewith-race, fullpkg/sql/compileandpkg/sql/colexec/table_scan, and selected-package static checks.Independent Hadoop 3.4.1 NameNode/DataNode A/B on a 10 MiB file with fresh caches: ordinary and hinted reads crossed with EOF−16, EOF−7, EOF, and EOF+7. At
74030b9e89, 7/8 passed (hinted EOF+7 leaked a seek error). Atb28e9b0a74, 8/8 passed; valid bytes matched and all short reads returned MOErrUnexpectedEOFwith zero bytes. No production or 1,000-warehouse / 1,000-terminal TPC-C result is claimed here. Before considering a 4.2 backport, compare client timeouts, lock-holder latency, throughput, and object requests/bytes under the original cold-start workload.