Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7ee342d
Initial WIP
kleimkuhler May 3, 2019
13b3a28
[WIP] Spawn cache purge in `poll_ready`
kleimkuhler May 4, 2019
4947d22
Spawn cache purge task when router is made
kleimkuhler May 6, 2019
aae62ff
Add router cache tests
kleimkuhler May 6, 2019
7c5be31
Fix tests that check missed
kleimkuhler May 6, 2019
ed1e035
Fix `--all` tests
kleimkuhler May 6, 2019
a86aca2
Improve comments on `Cache` and `PurgeCache`
kleimkuhler May 6, 2019
b771f7d
Fix tests to use runtimes and address PR nits
kleimkuhler May 8, 2019
a5dcf69
Rename `fn reserve` to `fn poll_reserve`
kleimkuhler May 28, 2019
fb0338e
WIP until tokio::sync::lock::Lock change merges
kleimkuhler Jun 3, 2019
de23688
Update `tokio-sync` to 0.1.6
kleimkuhler Jun 5, 2019
7a85ecd
Remove unnecessary Send bound on targets
kleimkuhler Jun 5, 2019
b9c0409
Additional bounds pruning
kleimkuhler Jun 5, 2019
afb108c
Move cache lock poll into ResponseFuture
kleimkuhler Jun 6, 2019
9f5a657
Cargo check passes; needs cleanup
kleimkuhler Jun 7, 2019
cbde562
Fix router test bounds
kleimkuhler Jun 7, 2019
6791ae1
Update tests with `fn reserve` signature
kleimkuhler Jun 10, 2019
3b835ff
Add clarifying comment on match arm
kleimkuhler Jun 10, 2019
d6b4d6f
Name some `ResponseFuture` state fields
kleimkuhler Jun 10, 2019
09ce0ea
Change Cache::reserve return type to `Poll`
kleimkuhler Jun 12, 2019
57030d4
WIP: Removing cache::Access
kleimkuhler Jun 13, 2019
01f5cfb
Remove Access and Reserve handles
kleimkuhler Jun 13, 2019
4168181
Remove pubs and unnecessary match arm
kleimkuhler Jun 14, 2019
3e1b4c6
Change `poll_insert` to return `Poll<(), Never>`
kleimkuhler Jun 17, 2019
ccb320e
Add access expiration reset test and comments
kleimkuhler Jun 17, 2019
ca90bda
Do not attempt to remove values when inserting
kleimkuhler Jun 18, 2019
e1d80c7
Address review feedback
kleimkuhler Jun 18, 2019
4909199
Add fixed router to profiles router
kleimkuhler Jun 19, 2019
4c41edc
Add clarifying comments
kleimkuhler Jun 20, 2019
18202ef
Merge remote-tracking branch 'origin/master' into kleimkuhler/router-…
kleimkuhler Jun 20, 2019
e49c992
Apply rustfmt and remove unnecessary clone
kleimkuhler Jun 20, 2019
8928fda
Ensure cache purge task continues to poll
kleimkuhler Jun 20, 2019
9964859
Simplify cache expirations poll statement
kleimkuhler Jun 21, 2019
ef1681f
trace -> debug
kleimkuhler Jun 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,13 @@ dependencies = [
"net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-buf 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-tcp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand Down Expand Up @@ -550,7 +550,7 @@ dependencies = [
"regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rustls 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-connect 0.1.0 (git+https://github.com/carllerche/tokio-connect)",
"tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -595,6 +595,10 @@ dependencies = [
"futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
"indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"linkerd2-stack 0.1.0",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-load-shed 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand All @@ -608,7 +612,7 @@ dependencies = [
"linkerd2-never 0.1.0",
"linkerd2-task 0.1.0",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-layer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand All @@ -619,7 +623,7 @@ version = "0.1.0"
dependencies = [
"futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand Down Expand Up @@ -1252,7 +1256,7 @@ dependencies = [

[[package]]
name = "tokio"
version = "0.1.18"
version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
Expand All @@ -1265,9 +1269,9 @@ dependencies = [
"tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-tcp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-udp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -1328,7 +1332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
Expand Down Expand Up @@ -1382,7 +1386,7 @@ dependencies = [

[[package]]
name = "tokio-sync"
version = "0.1.3"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
Expand All @@ -1404,7 +1408,7 @@ dependencies = [

[[package]]
name = "tokio-threadpool"
version = "0.1.13"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -1506,7 +1510,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-layer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand Down Expand Up @@ -1586,7 +1590,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-layer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -1701,7 +1705,7 @@ dependencies = [
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"resolv-conf 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
"trust-dns-proto 0.6.0 (git+https://github.com/bluejekyll/trust-dns?rev=7c8a0739dad495bf5a4fddfe86b8bbe2aa52d060)",
]

Expand Down Expand Up @@ -2002,7 +2006,7 @@ dependencies = [
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963"
"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098"
"checksum tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "65641e515a437b308ab131a82ce3042ff9795bef5d6c5a9be4eb24195c417fd9"
"checksum tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "94a1f9396aec29d31bb16c24d155cfa144d1af91c40740125db3131bdaf76da8"
"checksum tokio-buf 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "473a45a40e558d6d80e9f60e3d934c32488045def2745488a257e472941e9bce"
"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f"
"checksum tokio-connect 0.1.0 (git+https://github.com/carllerche/tokio-connect)" = "<none>"
Expand All @@ -2013,9 +2017,9 @@ dependencies = [
"checksum tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3cedc8e5af5131dc3423ffa4f877cce78ad25259a9a62de0613735a13ebc64b"
"checksum tokio-rustls 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7223fa02f4b2d9f3736f13cc3dea3723aaec57ca4b3dded922126ebbb2cb8ce9"
"checksum tokio-signal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6a5bf935a0151cc8899aa806ce6a425bdaec79ed4034de1a1e6bfa247e2def"
"checksum tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1bf2b9dac2a0509b5cfd1df5aa25eafacb616a42a491a13604d6bbeab4486363"
"checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7"
"checksum tokio-tcp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ec9b094851aadd2caf83ba3ad8e8c4ce65a42104f7b94d9e6550023f0407853f"
"checksum tokio-threadpool 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ec5759cf26cf9659555f36c431b515e3d05f66831741c85b4b5d5dfb9cf1323c"
"checksum tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72558af20be886ea124595ea0f806dd5703b8958e4705429dd58b3d8231f72f2"
"checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6"
"checksum tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350c9edade9830dc185ae48ba45667a445ab59f6167ef6d0254ec9d2430d9dd3"
"checksum tokio-udp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "137bda266504893ac4774e0ec4c2108f7ccdbcb7ac8dced6305fe9e4e0b5041a"
Expand Down
4 changes: 4 additions & 0 deletions lib/router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ publish = false
futures = "0.1"
indexmap = "1.0.0"
linkerd2-stack = { path = "../stack" }
log = "0.4"
tower-load-shed = "0.1"
tokio = "0.1.20"
tokio-sync = "0.1.6"
tokio-timer = "0.2.4"
tower-service = "0.2"
Loading