Propagate readPrefix in ParallelInputsProcessor

UnionBlockInputStream relies on ParallelInputsProcessor to do stream preparation in parallel, which seems to be absent. This patch fixes it.
This commit is contained in:
Amos Bird 2017-11-20 10:53:48 +08:00 committed by GitHub
parent 31fc79b809
commit 22e9772593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,6 +183,8 @@ private:
try try
{ {
for (auto & input : inputs)
input->readPrefix();
loop(thread_num); loop(thread_num);
} }
catch (...) catch (...)
@ -205,6 +207,7 @@ private:
{ {
try try
{ {
additional_input_at_end->readPrefix();
while (Block block = additional_input_at_end->read()) while (Block block = additional_input_at_end->read())
publishPayload(additional_input_at_end, block, thread_num); publishPayload(additional_input_at_end, block, thread_num);
} }