Hi Zuyu,
I am looking at the pull request for this feature now and will add my
comments on GitHub.
On 11/19/2016 11:17 PM, Jignesh Patel wrote:
Hi Zuyu,
This makes sense to me. I think Harshad has some work on concurrent query
execution in a branch, so would be good to get his input too. Perhaps, we could
move to a unified design to allow concurrent query execution?
Cheers,
Jignesh
On 11/19/16, 10:48 PM, "Zuyu Zhang" <[email protected] on behalf of
[email protected]> wrote:
Hi guys,
I would like to discuss some design changes regarding the QueryHandle
ownership during the life of serving a query.
I would propose to let QueryManager owns QueryHandle during the query
execution phase, instead of the main thread in QuickstepCli.
For those who are not familiar, QueryHandle is the central data structure
to hold the query id, the optimized query execution plan, and query
priority or like. And QueryManager is the key data structure to hold the
query execution state.
For now, the main thread in QuickstepCli manages the QueryHandle, and only
processes one query at a time. This situation, however, does not scale for
the distributed version which will have multiple DistributedClis submit
queries for concurrent execution.
By moving QueryHandle ownership to QueryManager, it fits well in both the
single-node and the distributed version. In addition, it becomes much
easier to do the clean-ups by Foreman-managed components upon the
completion of the query execution, instead of that Foreman notices the main
thread to do so.
Cheers,
Zuyu
--
Thanks,
Harshad