-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[BugFix]Fix filesystem cache failure. #65823
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
Conversation
Signed-off-by: edwinhzhang <[email protected]>
0d8331a to
1b194b1
Compare
Signed-off-by: edwinhzhang <[email protected]>
43485ee to
46c7e34
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a filesystem cache bug where the same cache key could have multiple std::shared_ptr<std::string> objects with custom deleters. When one shared_ptr was destroyed, it would erase the cache entry prematurely, causing performance degradation for other users of that cache entry.
Key Changes:
- Added
shard_idparameter to filesystem creation functions to enable shard-specific cache key reuse - Modified
insert_fs_cacheto check if the shard already has afs_cache_keyfor the given cache key and reuse it if found - Ensures only one
std::shared_ptr<std::string>exists per shard-cache_key combination
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| be/src/service/staros_worker.h | Added shard_id parameter to new_shared_filesystem and insert_fs_cache method signatures |
| be/src/service/staros_worker.cpp | Implemented cache key reuse logic in insert_fs_cache by checking shard's existing fs_cache_key before creating a new one, and updated call sites to pass shard_id |
Signed-off-by: edwinhzhang <[email protected]>
361c294 to
1c512c5
Compare
Signed-off-by: edwinhzhang <[email protected]>
5e5fc10 to
5fff4d2
Compare
Signed-off-by: edwinhzhang <[email protected]>
1a127ba to
fabd3b5
Compare
Signed-off-by: edwinhzhang <[email protected]>
f1f1b01 to
a1d41fc
Compare
✅ Backports have been created
|
🛑 Command
|
🛑 Command
|
🛑 Command
|
Signed-off-by: edwinhzhang <[email protected]> Signed-off-by: edwinhzhang <[email protected]> (cherry picked from commit 06a0a19)
|
@Mergifyio backport branch-4.0 branch-3.5 branch-3.4 branch-3.3 |
✅ Backports have been created
|
Signed-off-by: edwinhzhang <[email protected]> Signed-off-by: edwinhzhang <[email protected]> (cherry picked from commit 06a0a19)
Signed-off-by: edwinhzhang <[email protected]> Signed-off-by: edwinhzhang <[email protected]> Co-authored-by: zhanghe <[email protected]>
|
@Mergifyio backport branch-4.0 |
✅ Backports have been created
|
Signed-off-by: edwinhzhang <[email protected]> Signed-off-by: edwinhzhang <[email protected]> (cherry picked from commit 06a0a19)
|
@Mergifyio backport branch-3.4 |
|
@Mergifyio backport branch-3.3 |
✅ Backports have been created
|
✅ Backports have been created
|
Signed-off-by: edwinhzhang <[email protected]> Signed-off-by: edwinhzhang <[email protected]> (cherry picked from commit 06a0a19)
Signed-off-by: edwinhzhang <[email protected]> Signed-off-by: edwinhzhang <[email protected]> (cherry picked from commit 06a0a19)
Signed-off-by: edwinhzhang <[email protected]> Signed-off-by: edwinhzhang <[email protected]> Co-authored-by: zhanghe <[email protected]>
Signed-off-by: edwinhzhang <[email protected]> Signed-off-by: edwinhzhang <[email protected]> Co-authored-by: zhanghe <[email protected]>
Signed-off-by: edwinhzhang <[email protected]> Signed-off-by: edwinhzhang <[email protected]> Co-authored-by: zhanghe <[email protected]>
Why I'm doing:
What I'm doing:
#60053 has been fixed the bug resolving the cache failure issue. However, the problem still persists where the same string cache_key holds two
std::shared_ptr<std::string>objects.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: