[fix](be) Include HDFS connection in file handle cache key#63516
Open
suxiaogang223 wants to merge 1 commit into
Open
[fix](be) Include HDFS connection in file handle cache key#63516suxiaogang223 wants to merge 1 commit into
suxiaogang223 wants to merge 1 commit into
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: HDFS file handles were cached only by path and mtime, so a later query using a different hdfsFS authentication context could reuse a handle opened from another context when the same file path and mtime matched.
### Release note
None
### Check List (For Author)
- Test: Manual test
- `build-support/clang-format.sh be/src/io/fs/file_handle_cache.cpp be/src/io/fs/file_handle_cache.h be/test/io/fs/file_handle_cache_test.cpp`
- `git diff --cached --check`
- BE UT not run locally per request
- Behavior changed: No
- Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
run be-ut |
Member
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 31854 ms |
Contributor
TPC-DS: Total hot run time: 169339 ms |
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
This file contains hidden or 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
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.
What problem does this PR solve?
HDFS file handles were cached only by file path and mtime. In a pipeline that runs multiple Hive catalog cases against the same HDFS path shape, a later query can use a different
hdfsFSauthentication context while still matching the old cache key. That can reuse a handle opened under another context and lead to HDFS auth failures such asSIMPLE authentication is not enabled. Available:[TOKEN, KERBEROS].This PR includes the
hdfsFSidentity in the file handle cache key and partition hash, so cached handles are only reused within the same filesystem/authentication context.Issue Number: None
Related PR: None
Release note
None
Check List (For Author)
build-support/clang-format.sh be/src/io/fs/file_handle_cache.cpp be/src/io/fs/file_handle_cache.h be/test/io/fs/file_handle_cache_test.cpp