Skip to content
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

Reactive routes - fix race condition in generated handlers #8579

Merged
merged 1 commit into from
Apr 16, 2020

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Apr 15, 2020

@mkouba mkouba added this to the 1.4.0.Final milestone Apr 15, 2020
@mkouba
Copy link
Contributor Author

mkouba commented Apr 15, 2020

FYI @gsmet @michalszynkiewicz

@gsmet
Copy link
Member

gsmet commented Apr 15, 2020

@michalszynkiewicz I let you check that one as you discovered the issue?

@michalszynkiewicz
Copy link
Member

I know nothing about the code, but it looks that it moves code that was in initialize method to the constructor.
I added this commit to the PR I have consistently failing on the bug that is being fixed, let's see if it helps.

If I read correctly, it gets the arc container via static method in the constructor. Will the container always be ready at this point @mkouba ?

@mkouba
Copy link
Contributor Author

mkouba commented Apr 15, 2020

I know nothing about the code, but it looks that it moves code that was in initialize method to the constructor.

Yes, it does.

If I read correctly, it gets the arc container via static method in the constructor. Will the container always be ready at this point @mkouba ?

Yes, it should. That's why I added the BeanContainerBuildItem parameter to the addAdditionalRoutes() method.

@mkouba
Copy link
Contributor Author

mkouba commented Apr 15, 2020

I added this commit to the PR I have consistently failing on the bug that is being fixed, let's see if it helps.

+1

Copy link
Member

@stuartwdouglas stuartwdouglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not actually sure what race this is actually fixing, and there does not seem to be any info anywhere. The linked PR mentions that there is a bug but gives no info.

@mkouba
Copy link
Contributor Author

mkouba commented Apr 16, 2020

@stuartwdouglas I'm sorry. So while thinking of it it was rather a JMM visibility problem where a non-volatile field was set in one thread but probably not visible on the other thread.

@mkouba mkouba force-pushed the vertx-web-route-perf-fix branch from 6fc0326 to 4297e2c Compare April 16, 2020 06:49
@michalszynkiewicz
Copy link
Member

fyi, #8576 with this commit passes the checks

@stuartwdouglas stuartwdouglas merged commit aca4ceb into quarkusio:master Apr 16, 2020
@gsmet gsmet modified the milestones: 1.5.0, 1.4.0.Final Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants