mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge pull request #3429 from proller/fix13
CLICKHOUSE-4074 Fix merge_tree_uniform_read_distribution=0
This commit is contained in:
commit
2b946cdac6
@ -681,6 +681,8 @@ BlockInputStreams MergeTreeDataSelectExecutor::spreadMarkRangesAmongStreams(
|
|||||||
while (need_marks > 0 && !parts.empty())
|
while (need_marks > 0 && !parts.empty())
|
||||||
{
|
{
|
||||||
RangesInDataPart part = parts.back();
|
RangesInDataPart part = parts.back();
|
||||||
|
parts.pop_back();
|
||||||
|
|
||||||
size_t & marks_in_part = sum_marks_in_parts.back();
|
size_t & marks_in_part = sum_marks_in_parts.back();
|
||||||
|
|
||||||
/// We will not take too few rows from a part.
|
/// We will not take too few rows from a part.
|
||||||
@ -704,7 +706,6 @@ BlockInputStreams MergeTreeDataSelectExecutor::spreadMarkRangesAmongStreams(
|
|||||||
ranges_to_get_from_part = part.ranges;
|
ranges_to_get_from_part = part.ranges;
|
||||||
|
|
||||||
need_marks -= marks_in_part;
|
need_marks -= marks_in_part;
|
||||||
parts.pop_back();
|
|
||||||
sum_marks_in_parts.pop_back();
|
sum_marks_in_parts.pop_back();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -727,6 +728,7 @@ BlockInputStreams MergeTreeDataSelectExecutor::spreadMarkRangesAmongStreams(
|
|||||||
if (range.begin == range.end)
|
if (range.begin == range.end)
|
||||||
part.ranges.pop_back();
|
part.ranges.pop_back();
|
||||||
}
|
}
|
||||||
|
parts.emplace_back(part);
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockInputStreamPtr source_stream = std::make_shared<MergeTreeBlockInputStream>(
|
BlockInputStreamPtr source_stream = std::make_shared<MergeTreeBlockInputStream>(
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
00443_optimize_final_vertical_merge.reference
|
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
|
||||||
|
env CLICKHOUSE_CLIENT_OPT="--merge_tree_uniform_read_distribution=0" bash $CURDIR/00443_optimize_final_vertical_merge.sh
|
@ -2,7 +2,7 @@
|
|||||||
export CLICKHOUSE_BINARY=${CLICKHOUSE_BINARY:="clickhouse"}
|
export CLICKHOUSE_BINARY=${CLICKHOUSE_BINARY:="clickhouse"}
|
||||||
export CLICKHOUSE_CLIENT=${CLICKHOUSE_CLIENT:="${CLICKHOUSE_BINARY}-client"}
|
export CLICKHOUSE_CLIENT=${CLICKHOUSE_CLIENT:="${CLICKHOUSE_BINARY}-client"}
|
||||||
export CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL=${CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL:="warning"}
|
export CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL=${CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL:="warning"}
|
||||||
export CLICKHOUSE_CLIENT="${CLICKHOUSE_CLIENT} --send_logs_level=${CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL}"
|
export CLICKHOUSE_CLIENT="${CLICKHOUSE_CLIENT} --send_logs_level=${CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL} ${CLICKHOUSE_CLIENT_OPT}"
|
||||||
export CLICKHOUSE_LOCAL=${CLICKHOUSE_LOCAL:="${CLICKHOUSE_BINARY}-local"}
|
export CLICKHOUSE_LOCAL=${CLICKHOUSE_LOCAL:="${CLICKHOUSE_BINARY}-local"}
|
||||||
|
|
||||||
export CLICKHOUSE_CONFIG=${CLICKHOUSE_CONFIG:="/etc/clickhouse-server/config.xml"}
|
export CLICKHOUSE_CONFIG=${CLICKHOUSE_CONFIG:="/etc/clickhouse-server/config.xml"}
|
||||||
|
Loading…
Reference in New Issue
Block a user