Checking max execution speed on all nodes #5732

This commit is contained in:
Alexey Milovidov 2020-05-29 23:37:37 +03:00
parent fe9bd0e918
commit e4a329a47f

View File

@ -1498,16 +1498,19 @@ void InterpreterSelectQuery::executeFetchColumns(
* But limits on data size to read and maximum execution time are reasonable to check both on initiator and
* additionally on each remote server, because these limits are checked per block of data processed,
* and remote servers may process way more blocks of data than are received by initiator.
*
* The limits to throttle maximum execution speed is also checked on all servers.
*/
if (options.to_stage == QueryProcessingStage::Complete)
{
limits.speed_limits.min_execution_rps = settings.min_execution_speed;
limits.speed_limits.max_execution_rps = settings.max_execution_speed;
limits.speed_limits.min_execution_bps = settings.min_execution_speed_bytes;
limits.speed_limits.max_execution_bps = settings.max_execution_speed_bytes;
limits.speed_limits.timeout_before_checking_execution_speed = settings.timeout_before_checking_execution_speed;
}
limits.speed_limits.max_execution_rps = settings.max_execution_speed;
limits.speed_limits.max_execution_bps = settings.max_execution_speed_bytes;
limits.speed_limits.timeout_before_checking_execution_speed = settings.timeout_before_checking_execution_speed;
auto quota = context->getQuota();
for (auto & stream : streams)