Skip to content

Conversation

@airborne12
Copy link
Member

cherry pick from #59219

This PR refactors the compound index writer for the inverted index V2
format to optimize performance, particularly for cloud storage systems
like S3. The main improvement is bypassing unnecessary directory
operations by directly creating the output stream using an existing file
writer.

Key changes:

Added a static factory method FSIndexOutputV2::create() for direct
instantiation without requiring a Directory object
Refactored IndexStorageFormatV2::create_output_stream() to return only
an IndexOutput instead of a Directory-IndexOutput pair
Removed the cloud mode check in DorisFSDirectoryFactory::getDirectory()
to simplify code (directory creation is safe for all file systems)
@airborne12 airborne12 requested a review from yiguolei as a code owner December 25, 2025 10:46
@airborne12
Copy link
Member Author

run buildall

@Thearas
Copy link
Contributor

Thearas commented Dec 25, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 80.00% (20/25) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.31% (18606/34903)
Line Coverage 39.05% (172295/441182)
Region Coverage 33.70% (133103/394934)
Branch Coverage 34.73% (57611/165887)

@yiguolei yiguolei merged commit fea57a0 into apache:branch-4.0 Dec 26, 2025
24 of 27 checks passed
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Dec 26, 2025
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants