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

HTTP/2 backports for 8.1.x (part 1) #6581

Merged
merged 19 commits into from Mar 30, 2020
Merged

HTTP/2 backports for 8.1.x (part 1) #6581

merged 19 commits into from Mar 30, 2020

Conversation

masaori335
Copy link
Contributor

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.

masaori335 and others added 19 commits March 27, 2020 11:02
(cherry picked from commit 84d59dc)

Conflicts:
	proxy/http2/Http2ClientSession.cc
	proxy/http2/Http2Stream.cc
(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 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
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)
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
Provide stats for the limits introduced by 9c09dbc

(cherry picked from commit 5ec8112)
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)
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)
@masaori335 masaori335 added the Backport Marked for backport for an LTS patch release label Mar 27, 2020
@masaori335 masaori335 added this to the 8.1.0 milestone Mar 27, 2020
@masaori335 masaori335 self-assigned this Mar 27, 2020
@masaori335 masaori335 added this to Critical 8.x PRs for 8.1.0 in 8.x releases Mar 27, 2020
@zwoop zwoop merged commit eb815fb into apache:8.1.x Mar 30, 2020
@zwoop zwoop modified the milestones: 8.1.0, Backported Mar 30, 2020
@zwoop zwoop removed this from Critical 8.x PRs for 8.1.0 in 8.x releases Mar 30, 2020
@zwoop
Copy link
Contributor

zwoop commented Mar 30, 2020

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
Labels
Backport Marked for backport for an LTS patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants