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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #65905
   
   Problem Summary:
   
   Backport #65905 to `branch-4.0`.
   
   After a cloud segment is finalized, `SegmentWriter` allocates a cache holder 
over the segment index range and changes every intersecting cache block to 
`INDEX`. The range can cross S3 multipart buffer boundaries. If multipart 
buffers complete out of order, a later buffer can claim the cross-boundary 
block first and populate it with shifted bytes, corrupting cache reads while 
remote storage remains correct.
   
   Remove the post-finalize cache-holder allocation and cache-type change so 
segment blocks retain the cache type selected by the file writer.
   
   The source PR uses `be/src/storage/segment/segment_writer.cpp`. This 
backport applies the same deletion to the corresponding `branch-4.0` 
implementation in `be/src/olap/rowset/segment_v2/segment_writer.cpp`; it does 
not bring the master directory or API refactor into the release branch.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
           - Source PR #65905: `./run-be-ut.sh --run 
--filter=CloudFileCacheWriteIndexOnlyTest.* -j100` (3 tests passed).
           - This backport was not compiled or tested locally before PR 
creation, as requested.
           - Static validation: `git diff --check upstream/branch-4.0...HEAD`.
       - [ ] Manual test
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Segment cache blocks are no longer changed to `INDEX` after 
segment finalization.
   
   - 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