mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-22 21:59:59 +00:00
## Problem LKB-2502 The garbage collection of the project info cache is garbage. What we observed: If we get unlucky, we might throw away a very hot entry if the cache is full. The GC loop is dependent on getting a lucky shard of the projects2ep table that clears a lot of cold entries. The GC does not take into account active use, and the interval it runs at is too sparse to do any good. Can we switch to a proper cache implementation? Complications: 1. We need to invalidate by project/account. 2. We need to expire based on `retry_delay_ms`. ## Summary of changes 1. Replace `retry_delay_ms: Duration` with `retry_at: Instant` when deserializing. 2. Split the EndpointControls from the RoleControls into two different caches. 3. Introduce an expiry policy based on error retry info. 4. Introduce `moka` as a dependency, replacing our `TimedLru`. See the follow up PR for changing all TimedLru instances to use moka: #12726.
165 lines
9.9 KiB
TOML
165 lines
9.9 KiB
TOML
# This file is generated by `cargo hakari`.
|
|
# To regenerate, run:
|
|
# cargo hakari generate
|
|
|
|
[package]
|
|
name = "workspace_hack"
|
|
version = "0.1.0"
|
|
description = "workspace-hack package, managed by hakari"
|
|
# You can choose to publish this crate: see https://docs.rs/cargo-hakari/latest/cargo_hakari/publishing.
|
|
publish = false
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
# The parts of the file between the BEGIN HAKARI SECTION and END HAKARI SECTION comments
|
|
# are managed by hakari.
|
|
|
|
### BEGIN HAKARI SECTION
|
|
[dependencies]
|
|
ahash = { version = "0.8" }
|
|
anstream = { version = "0.6" }
|
|
anyhow = { version = "1", features = ["backtrace"] }
|
|
axum = { version = "0.8", features = ["ws"] }
|
|
axum-core = { version = "0.5", default-features = false, features = ["tracing"] }
|
|
base64 = { version = "0.21" }
|
|
base64ct = { version = "1", default-features = false, features = ["std"] }
|
|
bytes = { version = "1", features = ["serde"] }
|
|
camino = { version = "1", default-features = false, features = ["serde1"] }
|
|
chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "wasmbind"] }
|
|
clap = { version = "4", features = ["derive", "env", "string"] }
|
|
clap_builder = { version = "4", default-features = false, features = ["color", "env", "help", "std", "string", "suggestions", "usage"] }
|
|
const-oid = { version = "0.9", default-features = false, features = ["db", "std"] }
|
|
crossbeam-epoch = { version = "0.9" }
|
|
crossbeam-utils = { version = "0.8" }
|
|
crypto-bigint = { version = "0.5", features = ["generic-array", "zeroize"] }
|
|
der = { version = "0.7", default-features = false, features = ["derive", "flagset", "oid", "pem", "std"] }
|
|
deranged = { version = "0.3", default-features = false, features = ["powerfmt", "serde", "std"] }
|
|
digest = { version = "0.10", features = ["mac", "oid", "std"] }
|
|
ecdsa = { version = "0.16", features = ["pem", "signing", "std", "verifying"] }
|
|
either = { version = "1" }
|
|
elliptic-curve = { version = "0.13", default-features = false, features = ["digest", "hazmat", "jwk", "pem", "std"] }
|
|
env_filter = { version = "0.1", default-features = false, features = ["regex"] }
|
|
env_logger = { version = "0.11" }
|
|
fail = { version = "0.5", default-features = false, features = ["failpoints"] }
|
|
form_urlencoded = { version = "1" }
|
|
futures-channel = { version = "0.3", features = ["sink"] }
|
|
futures-core = { version = "0.3" }
|
|
futures-executor = { version = "0.3" }
|
|
futures-io = { version = "0.3" }
|
|
futures-sink = { version = "0.3" }
|
|
futures-util = { version = "0.3", features = ["channel", "io", "sink"] }
|
|
generic-array = { version = "0.14", default-features = false, features = ["more_lengths", "zeroize"] }
|
|
getrandom = { version = "0.2", default-features = false, features = ["std"] }
|
|
half = { version = "2", default-features = false, features = ["num-traits"] }
|
|
hashbrown = { version = "0.14", features = ["raw"] }
|
|
hex = { version = "0.4", features = ["serde"] }
|
|
hmac = { version = "0.12", default-features = false, features = ["reset"] }
|
|
hyper-582f2526e08bb6a0 = { package = "hyper", version = "0.14", features = ["client", "http1", "http2", "runtime", "server", "stream"] }
|
|
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1", features = ["full"] }
|
|
hyper-util = { version = "0.1", features = ["client-legacy", "server-auto", "service"] }
|
|
indexmap = { version = "2", features = ["serde"] }
|
|
itertools = { version = "0.12" }
|
|
lazy_static = { version = "1", default-features = false, features = ["spin_no_std"] }
|
|
libc = { version = "0.2", features = ["extra_traits", "use_std"] }
|
|
log = { version = "0.4", default-features = false, features = ["std"] }
|
|
memchr = { version = "2" }
|
|
nix-2f80eeee3b1b6c7e = { package = "nix", version = "0.26" }
|
|
nix-fa1f6196edfd7249 = { package = "nix", version = "0.30", features = ["dir", "ioctl", "mman", "poll", "signal", "socket"] }
|
|
nom = { version = "7" }
|
|
num = { version = "0.4" }
|
|
num-bigint = { version = "0.4" }
|
|
num-complex = { version = "0.4", default-features = false, features = ["std"] }
|
|
num-integer = { version = "0.1", features = ["i128"] }
|
|
num-iter = { version = "0.1", default-features = false, features = ["i128", "std"] }
|
|
num-rational = { version = "0.4", default-features = false, features = ["num-bigint-std", "std"] }
|
|
num-traits = { version = "0.2", features = ["i128", "libm"] }
|
|
once_cell = { version = "1" }
|
|
p256 = { version = "0.13", features = ["jwk"] }
|
|
parquet = { version = "53", default-features = false, features = ["zstd"] }
|
|
portable-atomic = { version = "1", features = ["require-cas"] }
|
|
prost = { version = "0.13", features = ["no-recursion-limit", "prost-derive"] }
|
|
rand = { version = "0.9" }
|
|
regex = { version = "1" }
|
|
regex-automata = { version = "0.4", default-features = false, features = ["dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "unicode"] }
|
|
regex-syntax = { version = "0.8" }
|
|
reqwest = { version = "0.12", default-features = false, features = ["blocking", "json", "rustls-tls", "rustls-tls-native-roots", "stream"] }
|
|
rustls = { version = "0.23", default-features = false, features = ["logging", "ring", "std", "tls12"] }
|
|
rustls-pki-types = { version = "1", features = ["std"] }
|
|
rustls-webpki = { version = "0.103", default-features = false, features = ["ring", "std"] }
|
|
scopeguard = { version = "1" }
|
|
sec1 = { version = "0.7", features = ["pem", "serde", "std", "subtle"] }
|
|
serde = { version = "1", features = ["alloc", "derive"] }
|
|
serde_json = { version = "1", features = ["alloc", "raw_value"] }
|
|
sha2 = { version = "0.10", features = ["asm", "oid"] }
|
|
signature = { version = "2", default-features = false, features = ["digest", "rand_core", "std"] }
|
|
smallvec = { version = "1", default-features = false, features = ["const_new", "write"] }
|
|
spki = { version = "0.7", default-features = false, features = ["pem", "std"] }
|
|
stable_deref_trait = { version = "1" }
|
|
subtle = { version = "2" }
|
|
sync_wrapper = { version = "0.1", default-features = false, features = ["futures"] }
|
|
thiserror = { version = "2" }
|
|
tikv-jemalloc-ctl = { version = "0.6", features = ["stats", "use_std"] }
|
|
tikv-jemalloc-sys = { version = "0.6", features = ["profiling", "stats", "unprefixed_malloc_on_supported_platforms"] }
|
|
time = { version = "0.3", features = ["macros", "serde-well-known"] }
|
|
tokio = { version = "1", features = ["full", "test-util"] }
|
|
tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "ring", "tls12"] }
|
|
tokio-stream = { version = "0.1", features = ["net", "sync"] }
|
|
tokio-util = { version = "0.7", features = ["codec", "compat", "io-util", "rt"] }
|
|
toml_edit = { version = "0.22", features = ["serde"] }
|
|
tonic = { version = "0.13", default-features = false, features = ["codegen", "gzip", "prost", "router", "server", "tls-native-roots", "tls-ring", "zstd"] }
|
|
tower = { version = "0.5", default-features = false, features = ["balance", "buffer", "limit", "log"] }
|
|
tracing = { version = "0.1", features = ["log"] }
|
|
tracing-core = { version = "0.1" }
|
|
tracing-log = { version = "0.2" }
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
|
|
url = { version = "2", features = ["serde"] }
|
|
zeroize = { version = "1", features = ["derive", "serde"] }
|
|
zstd = { version = "0.13" }
|
|
zstd-safe = { version = "7", default-features = false, features = ["arrays", "legacy", "std", "zdict_builder"] }
|
|
zstd-sys = { version = "2", default-features = false, features = ["legacy", "std", "zdict_builder"] }
|
|
|
|
[build-dependencies]
|
|
ahash = { version = "0.8" }
|
|
anstream = { version = "0.6" }
|
|
anyhow = { version = "1", features = ["backtrace"] }
|
|
bytes = { version = "1", features = ["serde"] }
|
|
cc = { version = "1", default-features = false, features = ["parallel"] }
|
|
chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "wasmbind"] }
|
|
clap = { version = "4", features = ["derive", "env", "string"] }
|
|
clap_builder = { version = "4", default-features = false, features = ["color", "env", "help", "std", "string", "suggestions", "usage"] }
|
|
either = { version = "1" }
|
|
getrandom = { version = "0.2", default-features = false, features = ["std"] }
|
|
half = { version = "2", default-features = false, features = ["num-traits"] }
|
|
hashbrown = { version = "0.14", features = ["raw"] }
|
|
indexmap = { version = "2", features = ["serde"] }
|
|
itertools = { version = "0.12" }
|
|
libc = { version = "0.2", features = ["extra_traits", "use_std"] }
|
|
log = { version = "0.4", default-features = false, features = ["std"] }
|
|
memchr = { version = "2" }
|
|
nom = { version = "7" }
|
|
num = { version = "0.4" }
|
|
num-bigint = { version = "0.4" }
|
|
num-complex = { version = "0.4", default-features = false, features = ["std"] }
|
|
num-integer = { version = "0.1", features = ["i128"] }
|
|
num-iter = { version = "0.1", default-features = false, features = ["i128", "std"] }
|
|
num-rational = { version = "0.4", default-features = false, features = ["num-bigint-std", "std"] }
|
|
num-traits = { version = "0.2", features = ["i128", "libm"] }
|
|
once_cell = { version = "1" }
|
|
parquet = { version = "53", default-features = false, features = ["zstd"] }
|
|
prettyplease = { version = "0.2", default-features = false, features = ["verbatim"] }
|
|
proc-macro2 = { version = "1" }
|
|
prost = { version = "0.13", features = ["no-recursion-limit", "prost-derive"] }
|
|
quote = { version = "1" }
|
|
regex = { version = "1" }
|
|
regex-automata = { version = "0.4", default-features = false, features = ["dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "unicode"] }
|
|
regex-syntax = { version = "0.8" }
|
|
serde = { version = "1", features = ["alloc", "derive"] }
|
|
serde_json = { version = "1", features = ["alloc", "raw_value"] }
|
|
syn = { version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
|
|
time-macros = { version = "0.2", default-features = false, features = ["formatting", "parsing", "serde"] }
|
|
toml_edit = { version = "0.22", features = ["serde"] }
|
|
zstd = { version = "0.13" }
|
|
zstd-safe = { version = "7", default-features = false, features = ["arrays", "legacy", "std", "zdict_builder"] }
|
|
zstd-sys = { version = "2", default-features = false, features = ["legacy", "std", "zdict_builder"] }
|
|
|
|
### END HAKARI SECTION
|