mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 14:02:55 +00:00
Part of #7497, closes #8817. ## Problem See #8817. ## Summary of changes **compute_ctl** - Renew lsn lease as soon as `/configure` updates pageserver_connstr, use `state_changed` Condvar for synchronization. **pageserver** As mentioned in https://github.com/neondatabase/neon/issues/8817#issuecomment-2315768076, we still want some permanent error reported if a lease cannot be granted. By considering attachment mode and the added `lsn_lease_deadline` when processing lease requests, we can also bound the case of bad requests to a very short period after migration/restart. - Refactor https://github.com/neondatabase/neon/pull/9024 and move `lsn_lease_deadline` to `AttachedTenantConf` so timeline can easily access it. - Have separate HTTP `init_lsn_lease` and libpq `renew_lsn_lease` API. - Always do LSN verification for the initial HTTP lease request. - LSN verification for the renewal is **still done** when tenants are not in `AttachedSingle` and we have pass the `lsn_lease_deadline`, which give plenty of time for compute to renew the lease. **neon_local** - add and call `timeline_init_lsn_lease` mgmt_api at static endpoint start. The initial lsn lease http request is sent when we run `cargo neon endpoint start <static endpoint>`. ## Testing - Extend `test_readonly_node_gc` to do pageserver restarts and migration. ## Future Work - The control plane should make the initial lease request through HTTP when creating a static endpoint. This is currently only done in `neon_local`. Signed-off-by: Yuchen Liang <yuchen@neon.tech>
42 lines
1.0 KiB
TOML
42 lines
1.0 KiB
TOML
[package]
|
|
name = "control_plane"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
camino.workspace = true
|
|
clap.workspace = true
|
|
comfy-table.workspace = true
|
|
futures.workspace = true
|
|
humantime.workspace = true
|
|
nix.workspace = true
|
|
once_cell.workspace = true
|
|
humantime-serde.workspace = true
|
|
hyper.workspace = true
|
|
regex.workspace = true
|
|
reqwest = { workspace = true, features = ["blocking", "json"] }
|
|
scopeguard.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
thiserror.workspace = true
|
|
toml.workspace = true
|
|
toml_edit.workspace = true
|
|
tokio.workspace = true
|
|
tokio-postgres.workspace = true
|
|
tokio-util.workspace = true
|
|
url.workspace = true
|
|
pageserver_api.workspace = true
|
|
pageserver_client.workspace = true
|
|
postgres_backend.workspace = true
|
|
safekeeper_api.workspace = true
|
|
postgres_connection.workspace = true
|
|
storage_broker.workspace = true
|
|
utils.workspace = true
|
|
whoami.workspace = true
|
|
|
|
compute_api.workspace = true
|
|
workspace_hack.workspace = true
|
|
tracing.workspace = true
|