fix for multiple threads

This commit is contained in:
yariks5s 2024-04-10 22:22:13 +00:00
parent 149e2af369
commit 94eb0782a9

View File

@ -53,7 +53,7 @@ IProcessor::Status BalancingChunksTransform::prepareConsume()
return Status::Finished;
}
if (input.isFinished())
if (input.isFinished() && !balance.isDataLeft())
{
for (auto & output : outputs)
output.finish();
@ -117,7 +117,10 @@ IProcessor::Status BalancingChunksTransform::prepareSend()
++chunk_number;
if (!chunk.hasChunkInfo())
throw Exception(ErrorCodes::LOGICAL_ERROR, "Chunk info must be not empty in prepareGenerate()");
{
has_data = false;
return Status::Ready;
}
if (was_processed)
continue;