dbms: fix read order with merge_tree_uniform_read_distribution to be consistent with old method [#METR-16457] [#METR-18009]

This commit is contained in:
Andrey Mironov 2015-09-16 16:13:49 +03:00
parent b3db6a06fc
commit b6449b00f0

View File

@ -103,9 +103,6 @@ public:
{ {
const auto marks_to_get_from_range = marks_in_part; const auto marks_to_get_from_range = marks_in_part;
/// Восстановим порядок отрезков.
std::reverse(thread_task.ranges.begin(), thread_task.ranges.end());
ranges_to_get_from_part = thread_task.ranges; ranges_to_get_from_part = thread_task.ranges;
marks_in_part -= marks_to_get_from_range; marks_in_part -= marks_to_get_from_range;
@ -137,6 +134,9 @@ public:
marks_in_part -= marks_to_get_from_range; marks_in_part -= marks_to_get_from_range;
need_marks -= marks_to_get_from_range; need_marks -= marks_to_get_from_range;
} }
/// Восстановим порядкок отрезков.
std::reverse(std::begin(ranges_to_get_from_part), std::end(ranges_to_get_from_part));
} }
return std::make_unique<MergeTreeReadTask>( return std::make_unique<MergeTreeReadTask>(