-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Reduce initial's Arc ManagedContext activation cost #34310
Conversation
Waiting #34132 to be merged (if merged) before moving with this |
.../runtime/src/main/java/io/quarkus/resteasy/reactive/common/runtime/ArcThreadSetupAction.java
Show resolved
Hide resolved
independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/RequestContext.java
Outdated
Show resolved
Hide resolved
independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/RequestContext.java
Outdated
Show resolved
Hide resolved
Marking as draft for now as this is still being discussed and CI is overloaded. |
*/ | ||
default void activate() { |
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.
For the record, this change is binary incompatible. However, the ManagedContext
interface is not intended to be implemented outside the ArC core. Therefore, there's a low risk of breaking existing code. If we run into a problem though we should consider adding synthetic bridge methods via https://github.com/dmlloyd/bridger.
a1a1744
to
965f906
Compare
This comment has been minimized.
This comment has been minimized.
@mkouba ManagedExecutorTest TCK failures are from the latest commits which includes your changes? |
Well, it's the
It seems that the captured |
@mkouba I've run locally the tests and I can confirm it indeed
|
I really don't know how this class works, it's mostly @manovotn who understands it :) |
@mkouba if we don't need to keep the assertion I can remove it, in case, and instead, open an issue where we need to understand better the life-cycle of it |
Yep, that sounds reasonable. Let's comment out that assertion for now and file a new tracking issue. |
@mkouba assertion removed! |
@mkouba assertion removed, do I need to squash the changes? |
This comment has been minimized.
This comment has been minimized.
Yes please ;-) |
@mkouba squashing done! (Sorry I've lost you as co-author :/ ) |
No problem. I think that the only thing you need to do is to add something like |
That is correct - it's simply a matter of editing the commit message and adding this |
- follow-up to quarkusio#34310 (cherry picked from commit 335651b)
This is a companion of #34132
On main:
ManagedContext
's initial activation requires to retrieve the request context state value (ieRequestContextState
instance freshly created) from the Vertx local context which is already known upfront ( 'cause is the first time we set it, so we know already): this pr is saving this lookupCurrentVertxRequest
's already provide a batch set method (thanks @stuartwdouglas for it!!!) we can use to avoid proxies to perform twice a delegate lookup (which involveio/quarkus/arc/impl/RequestContext.getIfActive
to happen twice)