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
Fix for background download in fs cache #55252
Fix for background download in fs cache #55252
Conversation
This is an automated comment for commit 1a839ad with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
b6a3a46
to
0a60117
Compare
0a60117
to
d13588e
Compare
1f858e2
to
825a2d0
Compare
@@ -521,7 +521,7 @@ KeyMetadata::iterator FileCache::addFileSegment( | |||
result_state = state; | |||
} | |||
|
|||
auto file_segment = std::make_shared<FileSegment>(key, offset, size, result_state, settings, this, locked_key.getKeyMetadata()); | |||
auto file_segment = std::make_shared<FileSegment>(key, offset, size, result_state, settings, background_download_threads > 0, this, locked_key.getKeyMetadata()); |
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.
0
usually means unlimited threads, but here it means we don't need to download a segment. Probably requires a comment somewhere.
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.
Added
74073db
to
faddc22
Compare
faddc22
to
c57a92f
Compare
src/Interpreters/Cache/Metadata.cpp
Outdated
} | ||
catch (...) | ||
{ | ||
if (holder) | ||
{ | ||
const auto & file_segment = holder->front(); | ||
auto & file_segment = holder->front(); | ||
file_segment.setDownloadFailed(); |
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.
The main fix is in this line. It prevents submitting the file segment back to download queue in ~FileSegmentsHolder() -> FileSegment::complete()
|
test_system_clusters_actual_information
00385_storage_file_and_clickhouse-local_app_long
|
…466021f57ccabbe15c1c278ebc826 Cherry pick #55252 to 23.8: Fix for background download in fs cache
…466021f57ccabbe15c1c278ebc826 Cherry pick #55252 to 23.9: Fix for background download in fs cache
Backport #55252 to 23.8: Fix for background download in fs cache
Backport #55252 to 23.9: Fix for background download in fs cache
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix for background download in fs cache.