From 0a59884b75d72e8213d83b6c41a6247f37fc2624 Mon Sep 17 00:00:00 2001 From: Bojan Serafimov Date: Mon, 20 Jun 2022 13:29:14 -0400 Subject: [PATCH] Update docs --- pageserver/src/page_service.rs | 12 ++++++------ test_runner/batch_others/test_import.py | 4 ---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/pageserver/src/page_service.rs b/pageserver/src/page_service.rs index 6d13460705..3b5e56c467 100644 --- a/pageserver/src/page_service.rs +++ b/pageserver/src/page_service.rs @@ -585,9 +585,6 @@ impl PageServerHandler { info!("flushing layers"); datadir_timeline.tline.checkpoint(CheckpointConfig::Flush)?; - // TODO Wait for s3 upload to complete - // info!("uploading layers"); - info!("done"); Ok(()) } @@ -630,9 +627,6 @@ impl PageServerHandler { info!("flushing layers"); datadir_timeline.tline.checkpoint(CheckpointConfig::Flush)?; - // TODO Wait for s3 upload to complete - // info!("uploading layers"); - info!("done"); Ok(()) } @@ -944,6 +938,9 @@ impl postgres_backend::Handler for PageServerHandler { // Import the `base` section (everything but the wal) of a basebackup. // Assumes the tenant already exists on this pageserver. // + // Files are scheduled to be persisted to remote storage, and the + // caller should poll the http api to check when that is done. + // // Example import command: // 1. Get start/end LSN from backup_manifest file // 2. Run: @@ -963,6 +960,9 @@ impl postgres_backend::Handler for PageServerHandler { pgb.write_message_noflush(&BeMessage::CommandComplete(b"SELECT 1"))?; } else if query_string.starts_with("import wal ") { // Import the `pg_wal` section of a basebackup. + // + // Files are scheduled to be persisted to remote storage, and the + // caller should poll the http api to check when that is done. let (_, params_raw) = query_string.split_at("import wal ".len()); let params = params_raw.split_whitespace().collect::>(); ensure!(params.len() == 4); diff --git a/test_runner/batch_others/test_import.py b/test_runner/batch_others/test_import.py index 423b1b5896..e478103313 100644 --- a/test_runner/batch_others/test_import.py +++ b/test_runner/batch_others/test_import.py @@ -21,8 +21,6 @@ def test_import_from_vanilla(test_output_dir, pg_bin, vanilla_pg, neon_env_build vanilla_pg.safe_psql('''create table t as select 'long string to consume some space' || g from generate_series(1,300000) g''') assert vanilla_pg.safe_psql('select count(*) from t') == [(300000, )] - # ensure that relation is larger than 1GB to test multisegment restore - # assert vanilla_pg.safe_psql("select pg_relation_size('t')")[0][0] > 1024 * 1024 * 1024 # Take basebackup basebackup_dir = os.path.join(test_output_dir, "basebackup") @@ -98,7 +96,6 @@ def test_import_from_vanilla(test_output_dir, pg_bin, vanilla_pg, neon_env_build import_tar(base_tar, wal_tar) # Wait for data to land in s3 - env.pageserver.safe_psql(f"checkpoint {tenant.hex} {timeline.hex}") wait_for_last_record_lsn(client, tenant, timeline, lsn_from_hex(end_lsn)) wait_for_upload(client, tenant, timeline, lsn_from_hex(end_lsn)) @@ -178,7 +175,6 @@ def test_import_from_pageserver(test_output_dir, pg_bin, vanilla_pg, neon_env_bu ]) # Wait for data to land in s3 - env.pageserver.safe_psql(f"checkpoint {tenant.hex} {timeline}") wait_for_last_record_lsn(client, tenant, UUID(timeline), lsn_from_hex(lsn)) wait_for_upload(client, tenant, UUID(timeline), lsn_from_hex(lsn))