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
update the proxy to use Tokio 0.3 #732
Commits on Oct 30, 2020
-
profiles: use
tokio::sync::watch
from Tokio 0.3It's possible that there's a memory leak in the Tokio 0.2 version of `tokio::sync::watch`. This commit updates the service-profiles code to use Tokio 0.3's version of watch, whose internals are significantly different.
Configuration menu - View commit details
-
Copy full SHA for f9caaec - Browse repository at this point
Copy the full SHA f9caaecView commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 4fc2f79 - Browse repository at this point
Copy the full SHA 4fc2f79View commit details -
Configuration menu - View commit details
-
Copy full SHA for b383a78 - Browse repository at this point
Copy the full SHA b383a78View commit details -
replace all
delay
s withsleep
sSigned-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 04960aa - Browse repository at this point
Copy the full SHA 04960aaView commit details -
ye olde massive IO trait update
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for f133b7d - Browse repository at this point
Copy the full SHA f133b7dView commit details -
update buffer to work with new mpsc
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for e165276 - Browse repository at this point
Copy the full SHA e165276View commit details -
factor out poll_ready-able MPSC
discovery::buffer also needs this Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 5e1ec7a - Browse repository at this point
Copy the full SHA 5e1ec7aView commit details -
use poll_readyable channel in
discovery::buffer
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for ca9e6a4 - Browse repository at this point
Copy the full SHA ca9e6a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 771af19 - Browse repository at this point
Copy the full SHA 771af19View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 32111d0 - Browse repository at this point
Copy the full SHA 32111d0View commit details -
use
tower-request-modifier
from before it became impossible to useturns out tower-rs/tower-http@926a64f made it more or less impossible for us to use the `tower-request-modifier` crate. it now returns services with `impl FnOnce` in their types, so we can't return it from `NewService` or `MakeService` impls. i'll fix this upstream eventually but for now let's just pin to the revision before it got that way.
Configuration menu - View commit details
-
Copy full SHA for 9932337 - Browse repository at this point
Copy the full SHA 9932337View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e98e5d - Browse repository at this point
Copy the full SHA 8e98e5dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c5024f - Browse repository at this point
Copy the full SHA 0c5024fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c8e4473 - Browse repository at this point
Copy the full SHA c8e4473View commit details
Commits on Nov 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 85fba37 - Browse repository at this point
Copy the full SHA 85fba37View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 89bddc6 - Browse repository at this point
Copy the full SHA 89bddc6View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for dacdd5e - Browse repository at this point
Copy the full SHA dacdd5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a47e5b - Browse repository at this point
Copy the full SHA 6a47e5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f289243 - Browse repository at this point
Copy the full SHA f289243View commit details
Commits on Nov 5, 2020
-
tokio 0.3 requires us to set O_NONBLOCK ourselves
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 5497ed5 - Browse repository at this point
Copy the full SHA 5497ed5View commit details -
test support sockets also need O_NONBLOCK
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 821af2c - Browse repository at this point
Copy the full SHA 821af2cView commit details -
fix channel max permits overflow
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 5bb8083 - Browse repository at this point
Copy the full SHA 5bb8083View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7c3a7e - Browse repository at this point
Copy the full SHA c7c3a7eView commit details
Commits on Nov 6, 2020
-
use the same h2 version has hyper does
this fixes error types not downcasting since different versions of h2 are in tree Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for f9d367a - Browse repository at this point
Copy the full SHA f9d367aView commit details -
pick up fix for missing EOFs (hyperium/hyper#2322)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 3d1d220 - Browse repository at this point
Copy the full SHA 3d1d220View commit details -
use the same h2 version as hyper 2: electric h2
tests and metrics also rely on h2 error downcasting Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 6a58672 - Browse repository at this point
Copy the full SHA 6a58672View commit details
Commits on Nov 9, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f471335 - Browse repository at this point
Copy the full SHA f471335View commit details
Commits on Nov 12, 2020
-
This branch updates the `linkerd2-drain` crate to use Tokio 0.3's synchronization primitives, and replace the `oneshot` channel with `watch` (removing the weird `future::Shared` nonsense). Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 869c702 - Browse repository at this point
Copy the full SHA 869c702View commit details -
Configuration menu - View commit details
-
Copy full SHA for 00771f8 - Browse repository at this point
Copy the full SHA 00771f8View commit details
Commits on Nov 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c23e58a - Browse repository at this point
Copy the full SHA c23e58aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8545bf8 - Browse repository at this point
Copy the full SHA 8545bf8View commit details
Commits on Nov 18, 2020
-
Merge branch 'main' into eliza/tokio-0.3
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 6a7195b - Browse repository at this point
Copy the full SHA 6a7195bView commit details
Commits on Nov 25, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c4375f0 - Browse repository at this point
Copy the full SHA c4375f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ed36a7 - Browse repository at this point
Copy the full SHA 1ed36a7View commit details -
fix test io expecting to be read
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 743156c - Browse repository at this point
Copy the full SHA 743156cView commit details -
WIP: update hyper, bytes, and friends
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 1f03099 - Browse repository at this point
Copy the full SHA 1f03099View commit details
Commits on Dec 1, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f7e68f1 - Browse repository at this point
Copy the full SHA f7e68f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8ac96a - Browse repository at this point
Copy the full SHA c8ac96aView commit details -
hopefully works with the new hyper upgrade api?
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for bb9a527 - Browse repository at this point
Copy the full SHA bb9a527View commit details -
Configuration menu - View commit details
-
Copy full SHA for 492d3d5 - Browse repository at this point
Copy the full SHA 492d3d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45e943d - Browse repository at this point
Copy the full SHA 45e943dView commit details
Commits on Dec 2, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 9fc1591 - Browse repository at this point
Copy the full SHA 9fc1591View commit details -
fix wrong http bodiy bytes conversion in tests
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 959c5d6 - Browse repository at this point
Copy the full SHA 959c5d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a3841d2 - Browse repository at this point
Copy the full SHA a3841d2View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 116cc74 - Browse repository at this point
Copy the full SHA 116cc74View commit details
Commits on Dec 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 88629ec - Browse repository at this point
Copy the full SHA 88629ecView commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 9e7d70d - Browse repository at this point
Copy the full SHA 9e7d70dView commit details -
io: don't vendor poll_read_buf
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 11f0649 - Browse repository at this point
Copy the full SHA 11f0649View commit details -
Merge branch 'eliza/tokio-0.3' of github.com:linkerd/linkerd2-proxy i…
…nto eliza/tokio-0.3
Configuration menu - View commit details
-
Copy full SHA for 5cff808 - Browse repository at this point
Copy the full SHA 5cff808View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1d60da - Browse repository at this point
Copy the full SHA b1d60daView commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for ce5536e - Browse repository at this point
Copy the full SHA ce5536eView commit details -
io: put back BoxedIo writev forwarding
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 41e59c3 - Browse repository at this point
Copy the full SHA 41e59c3View commit details -
fix every other asyncwrite not forwarding writev
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 561d971 - Browse repository at this point
Copy the full SHA 561d971View commit details -
io: use
poll_write_buf
from tokio-utilSigned-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 573b419 - Browse repository at this point
Copy the full SHA 573b419View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a111bf - Browse repository at this point
Copy the full SHA 8a111bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b3fc01 - Browse repository at this point
Copy the full SHA 5b3fc01View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86e1fbe - Browse repository at this point
Copy the full SHA 86e1fbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f2c218 - Browse repository at this point
Copy the full SHA 4f2c218View commit details -
This tracks the change that added an `instrument` combinator in the main `tracing` crate. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 1660e26 - Browse repository at this point
Copy the full SHA 1660e26View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 42567a9 - Browse repository at this point
Copy the full SHA 42567a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c3ee5a7 - Browse repository at this point
Copy the full SHA c3ee5a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8900cdd - Browse repository at this point
Copy the full SHA 8900cddView commit details
Commits on Dec 4, 2020
-
switch buffers to use Tokio 0.3 channels
This branch updates `linkerd2-buffer`, and `linkerd2-proxy-discover`'s `buffer` module to use Tokio 0.3's MPSC channel rather than Tokio 0.2's. The rest of the proxy still uses Tokio 0.2, including the 0.2 runtime. Most of the Tokio synchronization primitives lost their `poll`-based interfaces in 0.3 as part of the move to intrusive lists of wakers for synchronization primitives (see tokio-rs/tokio#2325, tokio-rs/tokio#2509, and tokio-rs/tokio#2861). This change takes advantage of the inherently pinned nature of `async fn` and `async` blocks to avoid needing a separate heap allocation to store the waiter state for a task waiting on a synchronization primitive. However, it means that a synchronization primitive can _only_ be waited on when the future that waits on it is pinned --- otherwise, there is a potential dangling pointer. The `poll`-based APIs allowed waiting on synchronization primitives from unpinned contexts, so they were removed. To wait on the synchronization primitives from contexts that may not be pinned, such as `poll_ready`, it's necessary to add a `Pin<Box<...>>` around the future that's waiting on the synchronization primitive. This ensures that the future will not move while it's part of the wait list. It's important to note that this isn't an _additional_ allocation per waiter versus Tokio 0.2; instead, it's the same allocation that would have _always_ happened internally to the synchronization primitive in the 0.2 API. Now, it's moved outside of the `tokio::sync` type so that it can be avoided when used with `async`/`await` syntax, and added by the user when polling the sync primitives. Because we need to poll channel senders in `tower::Service` implementations' `poll_ready` functions, it was necessary to introduce our own bounded MPSC channel type that exposes a polling-based API. When the buffer's channel is full, we want to exert backpressure in `poll_ready`, so that callers such as load balancers could choose to call another service rather than waiting for buffer capacity. This branch adds a new `linkerd2-channel` crate that implements a pollable bounded channel, wrapping `tokio::sync`'s unbounded MPSC and using a `tokio::sync::Semaphore` to implement bounding. It's worth noting that this is, essentially, how `tokio::sync::mpsc`'s bounded channel is implemented --- it also uses the semaphore. However, our implementation exposes a `poll_ready` method by boxing the future that waits to acquire a semaphore permit, which the Tokio channel does not expose. This was factored out of PR #732. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 598c9be - Browse repository at this point
Copy the full SHA 598c9beView commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for eb24cd8 - Browse repository at this point
Copy the full SHA eb24cd8View commit details -
let's just use tokio's error types
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 14cc5a7 - Browse repository at this point
Copy the full SHA 14cc5a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d02957 - Browse repository at this point
Copy the full SHA 0d02957View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e1503e - Browse repository at this point
Copy the full SHA 8e1503eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 50bebf3 - Browse repository at this point
Copy the full SHA 50bebf3View commit details -
transport: comment on socket conversion safety etc
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for cb9e35c - Browse repository at this point
Copy the full SHA cb9e35cView commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 1568cb1 - Browse repository at this point
Copy the full SHA 1568cb1View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for fd28ef0 - Browse repository at this point
Copy the full SHA fd28ef0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8129573 - Browse repository at this point
Copy the full SHA 8129573View commit details -
update the proxy to use Tokio 0.3
This branch updates the proxy to use Tokio 0.3 and the Tokio 0.3 versions of various ecosystem crates. This includes `tower` 0.4 and `bytes` 0.6, as well as the Tokio 0.3 versions of `tokio-util`, `hyper`, `tonic`, etc. Due to API changes in Tokio and in other dependencies, it was necessary to make some code changes as well as updating dependencies, but there should be no functional change. In particular: * Tokio's support for vectored IO changed significantly in 0.3, so this branch updates our use of `AsyncWrite` to participate in the new vectored write APIs * Hyper's HTTP/1.1 upgrade API changed in 0.14, so this branch changes the proxy's code for handling CONNECT to use the new API * Tokio removed support for some socket options, which now need to be set using `socket2` * Tokio removed the `poll_ready` method was removed from the bounded MPSC channel, so the proxy's buffers (`linkerd2-buffer` and the `buffer` module in `linkerd2-proxy-discover`) had to be switched to our own implementation (this merged separately, in PR #759). Several ecosystem crates have yet to be released, so we depend on them via Git dependencies for now. The patches in Cargo.toml can be removed as other dependencies publish their Tokio 0.3 versions.
Configuration menu - View commit details
-
Copy full SHA for 3642a18 - Browse repository at this point
Copy the full SHA 3642a18View commit details