-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove un-necessary Http1xServerConnection internal state synchronised access #5143
Remove un-necessary Http1xServerConnection internal state synchronised access #5143
Conversation
…tate of the request/response in progress. Such synchronization used to be useful before Vert.x 4 and the clear dispatch between connection/request code. Currently read and writes are confined in the event-loop thread and removing this synchronization has no effect on the read/writes of this state.
and check |
I think it should be fine for this case as we update the state of the request/response in progress and this sync and the request/close status which are not related to back-pressure/drain. As said in the PR, the state we update in the synchronized block is accessed exclusively from the event-loop thread which is the reason we remove the synchronization. In addition none of these blocks calls another method. Therefore it seems safe to me, WDYT ?
|
the best way would be to try running some of the tests on Quarkus which relies on it, by using a vertx which version relax these properties (ie this PR) @geoand @cescoffier how it looks? while re
we have many other parts where we synchronize over connection within vertx, if we plan to remove this, I would go for the others as well |
which others do you mean ? in this PR I only meant to remove synchronised usage of state mutation that is confined to the event-loop thread which is a trivial decision |
Http1xServerRequest, for example |
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.
LGTM thanks!
The
Http1xServerConnection
synchronize itself to guard the internal state of the request/response in progress.Such synchronization used to be useful before Vert.x 4 and the clear dispatch between connection/request code. Currently read and writes are confined in the event-loop thread and removing this synchronization has no effect on the read/writes of this state.