-
Notifications
You must be signed in to change notification settings - Fork 650
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
fix(pipelinetriggers): process mptv2 pipelines in parallel #1113
Conversation
The following commits need their title changed:
Please format your commit title into the form:
This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here. |
Co-authored-by: root <root@9f4b4814b0a1>
…xt/echo into cache-parallelism-dev
Hey @dreynaud, just tagging you here for visibility 👍 |
.collect(Collectors.toList())) | ||
.get(); | ||
} catch (InterruptedException | ExecutionException e) { | ||
return null; |
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.
Might be good to either log or throw the exception here, no? Not sure what the implication of returning null
is here, are we sure the consumers are ok with it?
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.
@dreynaud Good point, perhaps it's best to log the exception for visibility, then return an empty list which should match the existing behaviour?
Looks like a good change @robert-blackman 👍 Just see my other comment around the exception handling, otherwise LGTM Also tagging @robzienert 👀 |
@Mergifyio update |
@Mergifyio update |
❌ Pull request can't be updated with latest base branch changesMergify needs the author permission to update the base branch of the pull request. |
Hey @robert-blackman, do you mind allowing changes from maintainers on this PR? Eg https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork |
Hey
Several months ago we came across this issue whereby a large number of MPTv2 pipelines seemed to have a significant (negative) performance impact on pipeline triggers. Initial investigation indicated this was due to how the pipelines were planned. We originally developed a poc plan cache, this worked quite well however the scope of the fix grew as we discovered more code paths that called on the hydration method.
This fix takes a simpler approach by streaming the pipelines in parallel to orca for planning. This is implemented through the use of a
ForkJoinPool
using a custom parallelism argument,Runtime.getRuntime().availableProcessors()
by default. We decided to use aForkJoinPool
over a cached thread pool due to its lower memory footprint and work stealing virtues.The
parallelism
argument can be configured via the following spring config within theecho-local
profile:Would be great to get some feedback on this. Thanks!
Fixes this issue