mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 09:22:55 +00:00
With this commit one can request compute reconfiguration
from the running `compute_ctl` with compute in `Running` state
by sending a new spec:
```shell
curl -d "{\"spec\": $(cat ./compute-spec-new.json)}" http://localhost:3080/configure
```
Internally, we start a separate configurator thread that is waiting on
`Condvar` for `ConfigurationPending` compute state in a loop. Then it does
reconfiguration, sets compute back to `Running` state and notifies other
waiters.
It will need some follow-ups, e.g. for retry logic for control-plane
requests, but should be useful for testing in the current state. This
shouldn't affect any existing environment, since computes are configured
in a different way there.
Resolves neondatabase/cloud#4433
16 lines
283 B
Rust
16 lines
283 B
Rust
//!
|
|
//! Various tools and helpers to handle cluster / compute node (Postgres)
|
|
//! configuration.
|
|
//!
|
|
pub mod checker;
|
|
pub mod config;
|
|
pub mod configurator;
|
|
pub mod http;
|
|
#[macro_use]
|
|
pub mod logger;
|
|
pub mod compute;
|
|
pub mod monitor;
|
|
pub mod params;
|
|
pub mod pg_helpers;
|
|
pub mod spec;
|