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
HTTP/2 backports for 8.1.x (part 1) #6581
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit 0ad8519)
(cherry picked from commit 84d59dc) Conflicts: proxy/http2/Http2ClientSession.cc proxy/http2/Http2Stream.cc
(cherry picked from commit d3639e0)
(cherry picked from commit 2047495) Conflicts: proxy/http2/Http2ClientSession.cc
(cherry picked from commit eb87569) Conflicts: .gitignore proxy/hdrs/Makefile.am proxy/http2/HPACK.cc
(cherry picked from commit 8510a1c)
(cherry picked from commit 26c039d)
(cherry picked from commit fd5c84a) Conflicts: .gitignore proxy/hdrs/Makefile.am proxy/http2/RegressionHPACK.cc
(cherry picked from commit 0d2ad23) Conflicts: proxy/http2/HTTP2.cc proxy/http2/HTTP2.h proxy/http2/Http2Stream.cc proxy/http2/Http2Stream.h
(cherry picked from commit b2f6264)
There is a path of Http2Stream::update_read_request() starts shutdown and make current_reader nullptr. Copying HttpSM Id from current_reader should be done before the update_read_request() call. (cherry picked from commit 296cf29)
(cherry picked from commit 59c4a58)
READ_READY event is always signaled itself when Http2ClientSession is started. But this could waste some CPU cycle if there no data to read. (cherry picked from commit 03ff337)
(cherry picked from commit 532fa0d) Conflicts: doc/admin-guide/monitoring/statistics/core/http-connection.en.rst
(cherry picked from commit f2ebbce)
This introduces proxy.config.http2.header_table_size_limit that enables to configure internal HPACK header table size limit currently hard coded as 64KB. (cherry picked from commit 9c05e64)
(cherry picked from commit 323d5b5)
As it seems like there could be a race condition because the handling of HTTP2_SESSION_EVENT_SHUTDOWN_INIT is going through the event loop again and therefore may come in after the Session and its associated contexts are already cleaned up thus causing an use-after-free possibility (cherry picked from commit b0685db)
This is all done, merged and I marked all the PRs above with 8.1.0 Milestone. Thanks @masaori335 for the great PR! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first part of HTTP/2 backports to 8.1.x.
Backports:
#6307 - Reduce process duration of test_Http2FrequencyCounter
#4944 - Add history to HTTP/2
#5633 - HTTP/2: increment write_vio.ndone by consumed size
#5634 - HTTP/2: cancel reading buffer when ATS received GOAWAY
#5465 - Separate out common header compression logic to hdrs directory
#5676 - Log H2 errors with the codes
#5680 - HTTP/2 - tweak for better field name handling.
#5710 - Convert regression tests for XPACK into Catch based unit tests
#5747 - Add slow logs for HTTP/2 Connection & Stream
#5785 - Allocate DependencyTree only if HTTP/2 stream priority is enabled
#5766 - Record HttpSM Id on new transaction
#5825 - Cleanup: Remove unused function & old comments
#5826 - Cleanup: Signal READ_READY event only if the buffer is readable
#5613 - Doc: Add documentation for HTTP/2 statistics
#5889 - Provide stats for the recently introduced HTTP/2 rate limits
#5888 - Allow disabling HTTP/2 priority frames limit
#6055 - Add a config for internal HPACK header table size limit
#6098 - Replace container of HPACK dynamic table from std::vector to std::deque
#5878 - Add protection against use after free due to Http2ConnectionState::destroy() being called more than once per session
Next Step:
I could cherry-pick the above PRs smoothly ( no conflicts or easy to fix ). However, other recent PRs have huge conflicts because they depend on ProxySssn/Txn refactoring. To reduce conflicts, I'll open a cleanup PR for 8.1.x and cherry-pick others.