Gabriel39 opened a new pull request, #67634:
URL: https://github.com/apache/doris/pull/67634

   ### What problem does this PR solve?
   
   Issue Number: DORIS-28543
   
   Related PR: None
   
   Problem Summary:
   
   `HttpFileReader` expands small reads to a 1 MiB read-ahead request. Near 
EOF, the generated byte range can extend beyond the file size. Some 
Range-capable object stores respond to that overlong range with HTTP 200 and 
the complete object, so Doris incorrectly reports that Range support changed 
after it was successfully detected during open.
   
   This change clamps speculative read-ahead to the known file boundary. It 
also adds a local HTTP server unit test that reproduces the 206-at-open 
followed by 200-on-overlong-range behavior.
   
   ### Release note
   
   Fix HTTP range reads near EOF for servers that return the complete object 
for ranges extending past EOF.
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. HTTP read-ahead now respects the known EOF boundary.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to