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

prepare for Rust 1.50+ by boxing large futures #1003

Merged
merged 3 commits into from
May 12, 2021
Merged

prepare for Rust 1.50+ by boxing large futures #1003

merged 3 commits into from
May 12, 2021

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented May 12, 2021

Version 1.50 of the Rust compiler introduced a regression
(rust-lang/rust#84873) that results in the
compiler using extremely large amounts of memory (and eventually getting
OOM killed) when compiling code involving very large nested types. This
regression is triggered by a number of future types in the proxy.

This branch introduces several BoxService layers, primarily around
Switch layers, to reduce the size of future types, so that the proxy
can successfully be compiled on Rust 1.50+.

This branch does not update the toolchain version. The Rust 1.51
toolchain also introduces some new clippy lints, which trigger on some
code patterns that are very common in the current proxy. Therefore, the
diff from a compiler update will be much larger than just adding
additional boxing. I'll land the compiler update in a separate branch
after this merges.

Version 1.50 of the Rust compiler introduced a regression
(rust-lang/rust#84873) that results in the
compiler using extremely large amounts of memory (and eventually getting
OOM killed) when compiling code involving very large nested types. This
regression is triggered by a number of future types in the proxy.

This branch introduces several `BoxService` layers, primarily around
`Switch` layers, to reduce the size of future types, so that the proxy
can successfully be compiled on Rust 1.50+.

This branch does *not* update the toolchain version. The Rust 1.51
toolchain also introduces some new clippy lints, which trigger on some
code patterns that are very common in the current proxy. Therefore, the
diff from a compiler update will be much larger than just adding
additional boxing. I'll land the compiler update in a separate branch
after this merges.
@hawkw hawkw requested a review from a team May 12, 2021 17:13
linkerd/app/gateway/src/lib.rs Outdated Show resolved Hide resolved
linkerd/app/outbound/src/http/endpoint.rs Outdated Show resolved Hide resolved
linkerd/app/inbound/src/lib.rs Outdated Show resolved Hide resolved
@olix0r olix0r merged commit de5d42f into main May 12, 2021
@olix0r olix0r deleted the eliza/only-box branch May 12, 2021 18:09
olix0r added a commit to linkerd/linkerd2 that referenced this pull request May 14, 2021
This release adds an `l5d-client-id` header on mutually-authenticated
inbound requests so that applications can discover the client's
identity. This header is omitted on requests from unauthenticated
connections.

---

* improve diagnostics for rejected profile discovery (linkerd/linkerd2-proxy#998)
* Prepare for Rust 1.50+ by boxing large futures (linkerd/linkerd2-proxy#1003)
* http: Remove `identity_from_header` helper (linkerd/linkerd2-proxy#1004)
* inbound: Set the l5d-client-id header (linkerd/linkerd2-proxy#981)
* chore: update Rust toolchain to 1.52.1 (linkerd/linkerd2-proxy#1005)
* tracing: just control ansi colors with feature flags (linkerd/linkerd2-proxy#1006)
* ci: Use a matrix of fuzzer targets (linkerd/linkerd2-proxy#1007)
* outbound: Box HTTP endpoint stack (linkerd/linkerd2-proxy#1008)
* Box all stack modules (linkerd/linkerd2-proxy#1011)
olix0r added a commit to linkerd/linkerd2 that referenced this pull request May 19, 2021
This release adds an `l5d-client-id` header on mutually-authenticated
inbound requests so that applications can discover the client's
identity. This header is omitted on requests from unauthenticated
connections.

---

* improve diagnostics for rejected profile discovery (linkerd/linkerd2-proxy#998)
* Prepare for Rust 1.50+ by boxing large futures (linkerd/linkerd2-proxy#1003)
* http: Remove `identity_from_header` helper (linkerd/linkerd2-proxy#1004)
* inbound: Set the l5d-client-id header (linkerd/linkerd2-proxy#981)
* chore: update Rust toolchain to 1.52.1 (linkerd/linkerd2-proxy#1005)
* tracing: just control ansi colors with feature flags (linkerd/linkerd2-proxy#1006)
* ci: Use a matrix of fuzzer targets (linkerd/linkerd2-proxy#1007)
* outbound: Box HTTP endpoint stack (linkerd/linkerd2-proxy#1008)
* Box all stack modules (linkerd/linkerd2-proxy#1011)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants