-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] avoid redundant directory creation when create file block #55716
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6ca74a2
to
ea2e60f
Compare
Signed-off-by: luohaha <[email protected]>
ea2e60f
to
dd10ca1
Compare
kevincai
approved these changes
Feb 13, 2025
silverbullet233
approved these changes
Feb 13, 2025
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 3 / 3 (100.00%) file detail
|
stdpain
approved these changes
Feb 13, 2025
@Mergifyio backport branch-3.4 |
@Mergifyio backport branch-3.3 |
✅ Backports have been created
|
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Feb 13, 2025
…ck (#55716) Signed-off-by: luohaha <[email protected]> (cherry picked from commit 9c1f813)
Merged
18 tasks
mergify bot
pushed a commit
that referenced
this pull request
Feb 13, 2025
…ck (#55716) Signed-off-by: luohaha <[email protected]> (cherry picked from commit 9c1f813)
Merged
18 tasks
wanpengfei-git
pushed a commit
that referenced
this pull request
Feb 13, 2025
…ck (backport #55716) (#55878) Co-authored-by: Yixin Luo <[email protected]>
wanpengfei-git
pushed a commit
that referenced
this pull request
Feb 13, 2025
…ck (backport #55716) (#55879) Co-authored-by: Yixin Luo <[email protected]>
liaowanyou
pushed a commit
to liaowanyou/starrocks
that referenced
this pull request
Feb 17, 2025
…ck (StarRocks#55716) Signed-off-by: luohaha <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I'm doing:
After version 3.3, we support spilling operator intermediates to remote object storage. However, in the current implementation, every time a block is allocated, it checks whether the directory exists, resulting in unnecessary API calls and latency.
What I'm doing:
This pull request includes changes to the
FileBlockManager
class to optimize the creation of directories in the file block manager. The most important changes involve adding a check to avoid redundant directory creation and introducing a new member variable to track the last created directory.Optimization of directory creation:
be/src/exec/spill/file_block_manager.cpp
: Added a check to ensure that the directory is only created if it has not been created before, reducing unnecessary filesystem operations. ([be/src/exec/spill/file_block_manager.cppR237-R240](https://github.com/StarRocks/starrocks/pull/55716/files#diff-3bb4fc69ffe78e61658f4b5aa8ac78514b11550a0c87a1781c33d6a9d19a5e02R237-R240)
)be/src/exec/spill/file_block_manager.h
: Introduced a new member variable_last_created_container_dir
to store the path of the last created directory, which is used in the aforementioned check. ([be/src/exec/spill/file_block_manager.hR51](https://github.com/StarRocks/starrocks/pull/55716/files#diff-80a364cbfceb51fff006948ceed1b690236ad393f2fca768cf22032eb88b34e9R51)
)What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: