Closed
Description
Version
- vert.x core: 3.5.0
- vert.x web: 3.5.0
Context
The current RouteImpl implementation has thread-safety issues if the RouteImpl instance is used across multiple requests in multiple threads concurrently. The problem lies with the actualHandlerIndex and actualFailureHandlerIndex. These two fields are currently associated with RouteImpl. They should be part of the request state since each request have different values for them, and they could be modified concurrently due to the fact that handler can run in a completely different thread.
Extra
- Fix thread-safety of RouteImpl #739 could be one fix which puts those two problematic indexes into RoutingContext, which is a per-request object.