trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.21k stars 2.94k forks source link

Admit EXPLAIN queries when required worker count not satisfied #4131

Open findepi opened 4 years ago

findepi commented 4 years ago

Given coordinator with

node-scheduler.include-coordinator=false
query-manager.required-workers=1

query e.g.

EXPLAIN (TYPE IO) ....

will get into WAITING_FOR_RESOURCES state, waiting for a worker. However, once the worker shows up and query gets admitted, the query executes on coordinator only. We should not wait for a worker in this case.

Relates to: https://github.com/prestosql/presto/issues/4130

findepi commented 4 years ago

I used EXPLAIN (TYPE IO) as an example, because the results do not depend on workers in any way. EXPLAIN factors-in current worker count, so the results may be different once the required number of workers shows up.