Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

sql/analyzer: remove QueryProcess nodes from subqueries #603

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

erizocosmico
Copy link
Contributor

Closes src-d/gitbase#679

Because subqueries are analyzed as if they were a whole independent
query QueryProcess nodes were added to them. That caused that as
soon as a subquery finished, the process were marked as done. As a
result, some queries could error with "context canceled", as the
context of the query had already been canceled.

This fix removes the QueryProcess nodes from any subquery and makes
sure only the root node is wrapped in a QueryProcess.

Signed-off-by: Miguel Molina [email protected]

Closes src-d/gitbase#679

Because subqueries are analyzed as if they were a whole independent
query QueryProcess nodes were added to them. That caused that as
soon as a subquery finished, the process were marked as done. As a
result, some queries could error with "context canceled", as the
context of the query had already been canceled.

This fix removes the QueryProcess nodes from any subquery and makes
sure only the root node is wrapped in a QueryProcess.

Signed-off-by: Miguel Molina <[email protected]>
@erizocosmico erizocosmico requested a review from a team January 23, 2019 12:23
@erizocosmico
Copy link
Contributor Author

Merging this because it's blocking a task for the PoC.

@erizocosmico erizocosmico merged commit 5a90754 into src-d:master Jan 23, 2019
@erizocosmico erizocosmico deleted the fix/process-subquery branch January 23, 2019 13:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Context cancelled for query
3 participants