-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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 reading with uncompressed cache #31826
Conversation
src/Core/Settings.h
Outdated
@@ -77,7 +77,7 @@ class IColumn; | |||
M(UInt64, s3_max_connections, 1024, "The maximum number of connections per server.", 0) \ | |||
M(UInt64, hsts_max_age, 0, "Expired time for hsts. 0 means disable HSTS.", 0) \ | |||
M(Bool, extremes, false, "Calculate minimums and maximums of the result columns. They can be output in JSON-formats.", IMPORTANT) \ | |||
M(Bool, use_uncompressed_cache, false, "Whether to use the cache of uncompressed blocks.", 0) \ | |||
M(Bool, use_uncompressed_cache, true, "Whether to use the cache of uncompressed blocks.", 0) \ |
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.
Temporarly enable this setting, because we have only 2 tests with use_uncompressed_cache=true
.
@@ -87,7 +87,7 @@ CachedCompressedReadBuffer::CachedCompressedReadBuffer( | |||
void CachedCompressedReadBuffer::seek(size_t offset_in_compressed_file, size_t offset_in_decompressed_block) | |||
{ | |||
/// Nothing to do if we already at required position | |||
if (file_pos == offset_in_compressed_file | |||
if (!owned_cell && file_pos == offset_in_compressed_file |
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.
Without this change we could proceed to next compressed block and leave offset
of buffer in inconsistent state. (when we have offset() != offset_in_decompressed_block
, but nextimpl_working_buffer_offset == offset_in_decompressed_block
, because nextimpl_working_buffer_offset
is left from previous call.
3 tests failed with enabled |
Backport #31826 to 21.11: Fix reading with uncompressed cache
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix reading from
MergeTree
tables with enableduse_uncompressed_cache
.Fixes #31449.