Http2Stream may not be used across threads
Open
HTTP/2
Performance
Stale
- Dominant language
- C++
- Stars
- 2k
- Forks
- 874
- Avg merge
- 6d 15h
- Merged PRs (30d)
- 46
Description
The code below implies Http2Stream's event handler can be called from multiple threads, but I'm not sure if it really happens.
https://github.com/apache/trafficserver/blob/aa1d73b07fdb43f7e77f1fb72630f91a7086c366/proxy/http2/Http2Stream.cc#L143-L149
@masaori335 says switching threads is necessary for global server session pool, but we have `UnixNetVConnection::migrateToCurrentThread` and I think it ensures a server session is always on the same thread as the client session.
If `Http2Stream` is used always on the same thread we should be able to remove the logic, and it would improve performance.
Contributor guide
Assessment
This issue has not been assessed yet.