Skip to content

Commit

Permalink
Revert workaround for fixing bug introduced by ClickHouse/ClickHouse#…
Browse files Browse the repository at this point in the history
…58886 since ClickHouse/ClickHouse#59911 reverts #58886

(cherry picked from commit 7708bb3)
  • Loading branch information
baibaichen committed Feb 23, 2024
1 parent 46c4f8f commit 4da4f72
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,7 @@ class LocalFileReadBufferBuilder : public ReadBufferBuilder

if (set_read_util_position)
{
auto * work_around = read_buffer.get();
read_buffer = std::make_unique<DB::BoundedReadBuffer>(std::move(read_buffer));
// workaround for https://github.com/ClickHouse/ClickHouse/pull/58886
// ReadBufferFromFileDecorator construtor will call swap, without wrap, BoundedReadBuffer can't work.
read_buffer->swap(*work_around);

auto start_end_pos = adjustFileReadPosition(*read_buffer, file_info.start(), file_info.start() + file_info.length());
LOG_DEBUG(
&Poco::Logger::get("ReadBufferBuilder"),
Expand Down

0 comments on commit 4da4f72

Please sign in to comment.