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

   ### Background
   
   BE spill can use a local disk or a cloud object-storage vault. Both stores 
share capacity accounting and metrics, while only the local store inspects disk 
capacity and inodes. The spill manager initializes the stores before it starts 
its cleanup thread.
   
   ### What problem does this PR solve?
   
   Issue Number: None
   Related PR: #70474 (original combined change)
   PR Type: Refactor
   
   Problem Summary:
   
   Local directory handling and shared accounting live together, making it hard 
to review proposed cleanup changes separately from code movement. Split out the 
local store and make the capacity reservation and startup steps explicit while 
keeping the existing cleanup behavior.
   
   ### Details
   
   - **Change map:** BE source +338/-224; BE tests +16/-7. The first commit is 
the local-store move and include updates. The second separates checked 
reservation, unchecked reservation, release, and local startup setup, and 
shares the existing storage-mode constants.
   - **Moves vs. logic changes:** Move the local store implementation to its 
own files. Replace the forced-reservation boolean and public signed update with 
explicit operations; each reservation still uses the same lock and updates the 
same metric. Extract the directory setup loop without reordering startup.
   - **Behavior change:** None intended. File and query-directory deletion 
still attempt synchronous filesystem deletion first; the existing failure and 
shutdown retries, upload backpressure, and writer teardown are unchanged.
   - **Compatibility:** The `local` default, `s3` setting, spill paths and 
format, metrics, and FE/BE interface are unchanged.
   - **Performance impact:** None expected; the refactoring adds no locks, 
allocations, I/O, or work to the query teardown path.
   - **Rollback:** Revert the two commits in reverse order; no persistent or 
protocol state needs migration.
   
   ### Testing
   
   - Source comparisons verified the moved implementation, remote binding, and 
local startup loop, and verified that physical deletion, GC retries and upload 
backpressure are unchanged.
   - Local ASAN: 109 tests passed across SpillFileTest, SpillFileS3Test, 
SpillRepartitionerTest and SpillSortSourceOperatorTest. They cover synchronous 
deletion, failure retries, quota accounting, and spill round trips.
   - The expanded run also included S3FileWriterTest (124 total passed) with 
file cache disabled in the local test configuration. The initial expanded run 
stopped in the unchanged generic S3 mock fixture because it does not initialize 
the file cache factory.
   
   ### Notes for Reviewers
   
   Start with the second commit for the reservation and startup changes. Remote 
mode renaming, opaque object keys, upload accounting changes, and nonblocking 
deletion remain out of scope.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Behavior changed: No
   - Does this need documentation: No
   - Pre-submission status: Partially verified: SQL regression, live object 
storage and standalone clang-tidy were not run.
   
   ### AI Disclosure
   
   - Tool: Codex
   - Generated: Code extraction and adaptation, test call-site updates, 
verification, and PR description.
   - Human review: not stated
   


-- 
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