-
Notifications
You must be signed in to change notification settings - Fork 113
GraphQLServletListener.onRequest() can't be guaranteed run before DataFetcher.get() #375
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
Comments
code in HttpRequestInvokerImpl.invokeAndHandleAsync() may cause thread switch.
|
or any other suggestions ? |
@SylarChen You could disable async mode (for now) then it should work as expected. But when async mode is enabled we indeed need a way to ensure |
share the solution here:
|
I see the latest version 12.0.0 add feature "customer executor configuration", this helps a lot. but it seems async mode has other problem, see #403 please have a look.. @oliemansm |
@SylarChen Is this issue still relevant with the "customer executor configuration" function and its fix for #403 ? Or can this be closed now? |
this can be closed now |
How to reproduce:
set threadlocal in GraphQLServletListener.onRequest()
get threadlocal in DataFetcher.get()
sometimes can't get the threadlocal in DataFetcher.get()
ENV:
graphql-java-servlet version: 11.1.1
graphql-java: 16.1
openJDK: 11
graphql java servlet async mode
The text was updated successfully, but these errors were encountered: