-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rule: parallelize projects calling UAST not under exchanges #767
rule: parallelize projects calling UAST not under exchanges #767
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are failing (generally after upgrading mysql), because in Gopkg.toml we still have:
[[override]]
name = "github.com/moovweb/rubex"
branch = "go1"
where mysql and enry uses go-oniguruma:
github.com/src-d/go-oniguruma v1.0.0
return nil, io.EOF | ||
} | ||
|
||
if i.rows == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to wrap this if
by mutex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, Next
is never used in parallel
Fixes #766 Since rows are iterated serially (except for exchange nodes), when a Project node calls UAST, it's processed one at a time, which underutilizes the resources in the machine. When a Project calls UAST or UAST_MODE and is not under an Exchange node, which already parallelizes its children, replaces the project with a special node called parallelProject, which is essentially a project that keeps up to N goroutines processing rows, where N is the parallelism value of gitbase. Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Should be passing now |
Let's keep this on pause after the new fixed RC |
@erizocosmico Does the parallel project alter row order? If it does, it can give wrong results if ran after an ORDER BY. |
@smola yes, you're right. It needs to check if it has an order by underneath and not execute it in parallel in that case or return the rows in the same order. |
Fixes #766
Since rows are iterated serially (except for exchange nodes), when
a Project node calls UAST, it's processed one at a time, which
underutilizes the resources in the machine.
When a Project calls UAST or UAST_MODE and is not under an Exchange
node, which already parallelizes its children, replaces the project
with a special node called parallelProject, which is essentially a
project that keeps up to N goroutines processing rows, where N is
the parallelism value of gitbase.
Signed-off-by: Miguel Molina miguel@erizocosmi.co