Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
7ffcbfd
refactor: Move LFC function prototypes to separate header file (#11458)
hlinnaka Apr 8, 2025
8a6d0dc
build(deps): bump tokio from 1.38.0 to 1.38.2 in /test_runner/pg_clie…
dependabot[bot] Apr 8, 2025
7791a49
fix(tests): improve test_scrubber_tenant_snapshot stability (#11471)
DimasKovas Apr 8, 2025
a7142f3
Configure rsyslog for logs export using the spec (#11338)
zaynetro Apr 8, 2025
6138d61
Object storage proxy (#11357)
Apr 8, 2025
a09c933
test(pageserver): add conditional append test record (#11476)
skyzh Apr 8, 2025
d177654
gitignore: add `/artifact_cache` (#11493)
erikgrinaker Apr 8, 2025
7679b63
pageserver: persist stripe size in tenant manifest for tenant_import …
erikgrinaker Apr 8, 2025
c9ca8b7
One more fix for unlogged build support in DEBUG_COMPARE_LOCAL (#11474)
knizhnik Apr 9, 2025
c610f35
test_runner: tweak `test_create_snapshot` compaction (#11495)
erikgrinaker Apr 9, 2025
cf62017
storcon: add https metrics for pageservers/safekeepers (#11460)
DimasKovas Apr 9, 2025
a6ff8ec
storcon: change default stripe size to 16 MB (#11168)
erikgrinaker Apr 9, 2025
d2825e7
Add is_stopping check around critical macro in walreceiver (#11496)
arpad-m Apr 9, 2025
ef8101a
refactor: Split "communicator" routines to a separate source file (#1…
hlinnaka Apr 9, 2025
e7502a3
pageserver: return 412 PreconditionFailed in get_timestamp_of_lsn if …
DimasKovas Apr 9, 2025
d11f23a
pageserver: refactor read path for multi LSN batching support (#11463)
VladLazar Apr 9, 2025
72832b3
chore: fix clippy lints from nightly-2025-03-16 (#11273)
conradludgate Apr 9, 2025
66f80e7
tests/performance: reconcile until idle before benchmark (#11435)
VladLazar Apr 9, 2025
afd3429
Make neon_local token generation generic over claims (#11507)
tristan957 Apr 9, 2025
1c237d0
Move compute_ctl claims struct into public API (#11505)
tristan957 Apr 9, 2025
af12647
large tenant oltp benchmark: reindex with downtime (remove concurrent…
Bodobolero Apr 9, 2025
ec66b78
fix(pageserver): use different walredo retry setting for gc-compactio…
skyzh Apr 9, 2025
2c21a65
feat(pageserver): add gc-compaction time-to-first-item stats (#11475)
skyzh Apr 9, 2025
63ee8e2
test_runner: ignore `.___temp` files in `evict_random_layers` (#11509)
erikgrinaker Apr 9, 2025
405a17b
fix(pageserver): ensure gc-compaction gets preempted by L0 (#11512)
skyzh Apr 9, 2025
af0be11
fix(pageserver): ensure gc-compaction gets preempted by L0 (#11512)
skyzh Apr 9, 2025
a04e33c
Remove --spec-json argument from compute_ctl (#11510)
tristan957 Apr 9, 2025
8a72e6f
pageserver: add enable_tls_page_service_api (#11508)
DimasKovas Apr 10, 2025
fae7528
walproposer: make it aware of membership (#11407)
arssher Apr 10, 2025
0122d97
test_runner: only use last gen in `test_location_conf_churn` (#11511)
erikgrinaker Apr 10, 2025
5063151
compute: Add more neon ids to compute (#11366)
lubennikovaav Apr 10, 2025
2e35f23
tests: remove ignored `fair` field (#11521)
problame Apr 10, 2025
f06d721
test(pageserver): ensure gc-compaction does not fire critical errors …
skyzh Apr 10, 2025
5487a20
compute: Set log_parameter=off for audit logging. (#11500)
lubennikovaav Apr 10, 2025
52dee40
storage controller: improve safety of shard splits coinciding with co…
jcsp Apr 10, 2025
9c37bfc
pageserver/tests: make image_layer_rewrite write less data (#11525)
jcsp Apr 10, 2025
3426074
Make Endpoint::respec_deep() infinitely deep (#11527)
tristan957 Apr 10, 2025
4c4e33b
storage: add http/https server and cert resover metrics (#11450)
DimasKovas Apr 11, 2025
8884865
tests: make `test_pageserver_getpage_throttle` less flaky (#11482)
problame Apr 11, 2025
979fa06
tests: update batching perf test workload to include scattered LSNs (…
problame Apr 11, 2025
3c8565a
test_runner: propagate config via `attach_hook` for test fix (#11529)
erikgrinaker Apr 11, 2025
a6937a3
pageserver: improve shard ancestor compaction logging (#11535)
erikgrinaker Apr 11, 2025
88f01c1
Introduce WalIngestError (#11506)
arpad-m Apr 11, 2025
c66444e
Add timeline_import http endpoint (#11484)
arpad-m Apr 11, 2025
ff5a527
Consolidate compute_ctl configuration structures (#11514)
tristan957 Apr 11, 2025
fd16caa
pageserver: yield for L0 during ancestor compaction (#11536)
erikgrinaker Apr 11, 2025
66f56dd
fix(pageserver): allow shutdown errors for gc compaction tests (#11530)
skyzh Apr 11, 2025
4f7b2cd
feat(pageserver): gc-compaction result verification (#11515)
skyzh Apr 11, 2025
d109bf8
neon_local: use ed25519 to gen local ssl certs (#11542)
DimasKovas Apr 11, 2025
946e971
feat(proxy): add batching to cancellation queue processing (#10607)
conradludgate Apr 12, 2025
8936a7a
Increase limit for worker processes for isolation test (#11504)
knizhnik Apr 12, 2025
a338984
pageserver: support keys at different LSNs in one get page batch (#1…
VladLazar Apr 14, 2025
307fa2c
Remove unused n_synced variable from HandleSafekeeperResponse (#11553)
knizhnik Apr 14, 2025
e0ee6fb
Remove deprecated --compute-hook-url storcon param (#11551)
arpad-m Apr 14, 2025
daebe50
refactor: plumb gate and cancellation down to to blob_io::BlobWriter …
problame Apr 14, 2025
148b370
pageserver: add metrics for get page batch breaking reasons (#11545)
VladLazar Apr 14, 2025
4370718
Fix logging in nightly physical replication benchmarks (#11541)
tristan957 Apr 14, 2025
e85607e
tests: remove config tweak allowing old versions to start with a batc…
VladLazar Apr 14, 2025
057ce11
fix(test): allow stale generation errors (1/2) (#11531)
skyzh Apr 14, 2025
90b706c
tests: save pageserver metrics at the end of the test (#11559)
VladLazar Apr 14, 2025
8cce27b
pageserver: add a randomized read path test (#11519)
VladLazar Apr 14, 2025
028a191
Continue with s/spec/config changes (#11574)
tristan957 Apr 14, 2025
cbd2fc2
Clean up logs and error messages in compute_ctl authorize middleware …
tristan957 Apr 15, 2025
51ecd1b
Proxy release 2025-04-15
github-actions[bot] Apr 15, 2025
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
!pageserver/
!pgxn/
!proxy/
!object_storage/
!storage_scrubber/
!safekeeper/
!storage_broker/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/artifact_cache
/pg_install
/target
/tmp_check
Expand Down
56 changes: 53 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ members = [
"libs/proxy/postgres-protocol2",
"libs/proxy/postgres-types2",
"libs/proxy/tokio-postgres2",
"object_storage",
]

[workspace.package]
Expand Down Expand Up @@ -208,6 +209,7 @@ tracing-opentelemetry = "0.28"
tracing-serde = "0.2.0"
tracing-subscriber = { version = "0.3", default-features = false, features = ["smallvec", "fmt", "tracing-log", "std", "env-filter", "json"] }
try-lock = "0.2.5"
test-log = { version = "0.2.17", default-features = false, features = ["log"] }
twox-hash = { version = "1.6.3", default-features = false }
typed-json = "0.1"
url = "2.2"
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ RUN set -e \
--bin storage_broker \
--bin storage_controller \
--bin proxy \
--bin object_storage \
--bin neon_local \
--bin storage_scrubber \
--locked --release
Expand Down Expand Up @@ -121,6 +122,7 @@ COPY --from=build --chown=neon:neon /home/nonroot/target/release/safekeeper
COPY --from=build --chown=neon:neon /home/nonroot/target/release/storage_broker /usr/local/bin
COPY --from=build --chown=neon:neon /home/nonroot/target/release/storage_controller /usr/local/bin
COPY --from=build --chown=neon:neon /home/nonroot/target/release/proxy /usr/local/bin
COPY --from=build --chown=neon:neon /home/nonroot/target/release/object_storage /usr/local/bin
COPY --from=build --chown=neon:neon /home/nonroot/target/release/neon_local /usr/local/bin
COPY --from=build --chown=neon:neon /home/nonroot/target/release/storage_scrubber /usr/local/bin

Expand Down
77 changes: 25 additions & 52 deletions compute_tools/src/bin/compute_ctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,20 @@
//! ```sh
//! compute_ctl -D /var/db/postgres/compute \
//! -C 'postgresql://cloud_admin@localhost/postgres' \
//! -S /var/db/postgres/specs/current.json \
//! -c /var/db/postgres/configs/config.json \
//! -b /usr/local/bin/postgres \
//! -r http://pg-ext-s3-gateway \
//! ```
use std::ffi::OsString;
use std::fs::File;
use std::path::Path;
use std::process::exit;
use std::sync::mpsc;
use std::thread;
use std::time::Duration;

use anyhow::{Context, Result};
use clap::Parser;
use compute_api::responses::ComputeCtlConfig;
use compute_api::spec::ComputeSpec;
use compute_api::responses::ComputeConfig;
use compute_tools::compute::{
BUILD_TAG, ComputeNode, ComputeNodeParams, forward_termination_signal,
};
Expand Down Expand Up @@ -118,16 +116,21 @@ struct Cli {
#[arg(long)]
pub set_disk_quota_for_fs: Option<String>,

#[arg(short = 's', long = "spec", group = "spec")]
pub spec_json: Option<String>,

#[arg(short = 'S', long, group = "spec-path")]
pub spec_path: Option<OsString>,
// TODO(tristan957): remove alias after compatibility tests are no longer
// an issue
#[arg(short = 'c', long, alias = "spec-path")]
pub config: Option<OsString>,

#[arg(short = 'i', long, group = "compute-id")]
pub compute_id: String,

#[arg(short = 'p', long, conflicts_with_all = ["spec", "spec-path"], value_name = "CONTROL_PLANE_API_BASE_URL")]
#[arg(
short = 'p',
long,
conflicts_with = "config",
value_name = "CONTROL_PLANE_API_BASE_URL",
requires = "compute-id"
)]
pub control_plane_uri: Option<String>,
}

Expand All @@ -136,7 +139,7 @@ fn main() -> Result<()> {

let scenario = failpoint_support::init();

// For historical reasons, the main thread that processes the spec and launches postgres
// For historical reasons, the main thread that processes the config and launches postgres
// is synchronous, but we always have this tokio runtime available and we "enter" it so
// that you can use tokio::spawn() and tokio::runtime::Handle::current().block_on(...)
// from all parts of compute_ctl.
Expand All @@ -152,7 +155,7 @@ fn main() -> Result<()> {

let connstr = Url::parse(&cli.connstr).context("cannot parse connstr as a URL")?;

let cli_spec = try_spec_from_cli(&cli)?;
let config = get_config(&cli)?;

let compute_node = ComputeNode::new(
ComputeNodeParams {
Expand All @@ -172,10 +175,8 @@ fn main() -> Result<()> {
cgroup: cli.cgroup,
#[cfg(target_os = "linux")]
vm_monitor_addr: cli.vm_monitor_addr,
live_config_allowed: cli_spec.live_config_allowed,
},
cli_spec.spec,
cli_spec.compute_ctl_config,
config,
)?;

let exit_code = compute_node.run()?;
Expand All @@ -200,37 +201,17 @@ async fn init() -> Result<()> {
Ok(())
}

fn try_spec_from_cli(cli: &Cli) -> Result<CliSpecParams> {
// First, try to get cluster spec from the cli argument
if let Some(ref spec_json) = cli.spec_json {
info!("got spec from cli argument {}", spec_json);
return Ok(CliSpecParams {
spec: Some(serde_json::from_str(spec_json)?),
compute_ctl_config: ComputeCtlConfig::default(),
live_config_allowed: false,
});
fn get_config(cli: &Cli) -> Result<ComputeConfig> {
// First, read the config from the path if provided
if let Some(ref config) = cli.config {
let file = File::open(config)?;
return Ok(serde_json::from_reader(&file)?);
}

// Second, try to read it from the file if path is provided
if let Some(ref spec_path) = cli.spec_path {
let file = File::open(Path::new(spec_path))?;
return Ok(CliSpecParams {
spec: Some(serde_json::from_reader(file)?),
compute_ctl_config: ComputeCtlConfig::default(),
live_config_allowed: true,
});
}

if cli.control_plane_uri.is_none() {
panic!("must specify --control-plane-uri");
};

match get_spec_from_control_plane(cli.control_plane_uri.as_ref().unwrap(), &cli.compute_id) {
Ok(resp) => Ok(CliSpecParams {
spec: resp.0,
compute_ctl_config: resp.1,
live_config_allowed: true,
}),
// If the config wasn't provided in the CLI arguments, then retrieve it from
// the control plane
match get_config_from_control_plane(cli.control_plane_uri.as_ref().unwrap(), &cli.compute_id) {
Ok(config) => Ok(config),
Err(e) => {
error!(
"cannot get response from control plane: {}\n\
Expand All @@ -242,14 +223,6 @@ fn try_spec_from_cli(cli: &Cli) -> Result<CliSpecParams> {
}
}

struct CliSpecParams {
/// If a spec was provided via CLI or file, the [`ComputeSpec`]
spec: Option<ComputeSpec>,
#[allow(dead_code)]
compute_ctl_config: ComputeCtlConfig,
live_config_allowed: bool,
}

fn deinit_and_exit(exit_code: Option<i32>) -> ! {
// Shutdown trace pipeline gracefully, so that it has a chance to send any
// pending traces before we exit. Shutting down OTEL tracing provider may
Expand Down
17 changes: 9 additions & 8 deletions compute_tools/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,15 @@ pub async fn get_database_schema(
.kill_on_drop(true)
.spawn()?;

let stdout = cmd.stdout.take().ok_or_else(|| {
std::io::Error::new(std::io::ErrorKind::Other, "Failed to capture stdout.")
})?;
let stdout = cmd
.stdout
.take()
.ok_or_else(|| std::io::Error::other("Failed to capture stdout."))?;

let stderr = cmd.stderr.take().ok_or_else(|| {
std::io::Error::new(std::io::ErrorKind::Other, "Failed to capture stderr.")
})?;
let stderr = cmd
.stderr
.take()
.ok_or_else(|| std::io::Error::other("Failed to capture stderr."))?;

let mut stdout_reader = FramedRead::new(stdout, BytesCodec::new());
let stderr_reader = BufReader::new(stderr);
Expand All @@ -128,8 +130,7 @@ pub async fn get_database_schema(
}
});

return Err(SchemaDumpError::IO(std::io::Error::new(
std::io::ErrorKind::Other,
return Err(SchemaDumpError::IO(std::io::Error::other(
"failed to start pg_dump",
)));
}
Expand Down
Loading
Loading