diff --git a/ALEK_LIST_FILES.txt b/ALEK_LIST_FILES.txt deleted file mode 100644 index 10a2f27c84..0000000000 --- a/ALEK_LIST_FILES.txt +++ /dev/null @@ -1 +0,0 @@ -[RemotePath("tenants/1fa068222e7cc9113a7d790ef4921ac2/timelines/f0895167297fb57d8beff3c89deb4b41/000000000000000000000000000000000000-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF__000000000169B098-000000000169B111"), RemotePath("tenants/1fa068222e7cc9113a7d790ef4921ac2/timelines/f0895167297fb57d8beff3c89deb4b41/index_part.json"), RemotePath("tenants/60f5b0fed2e13576f36abf833475d2f9/timelines/109292e9aa6241fd0a8efa0bc3daea22/000000000000000000000000000000000000-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF__000000000169B098-000000000169B111"), RemotePath("tenants/60f5b0fed2e13576f36abf833475d2f9/timelines/109292e9aa6241fd0a8efa0bc3daea22/index_part.json"), RemotePath("tenants/60f5b0fed2e13576f36abf833475d2f9/timelines/784c71b4e09a0f52d1e8f401347caee9/000000000000000000000000000000000000-FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF__000000000169B098-000000000169B111"), RemotePath("tenants/60f5b0fed2e13576f36abf833475d2f9/timelines/784c71b4e09a0f52d1e8f401347caee9/index_part.json"), RemotePath("v15/share/extension/test_ext.control")] \ No newline at end of file diff --git a/compute_tools/src/http/api.rs b/compute_tools/src/http/api.rs index abfb6057b7..314ba3b85f 100644 --- a/compute_tools/src/http/api.rs +++ b/compute_tools/src/http/api.rs @@ -163,57 +163,58 @@ async fn routes(req: Request, compute: &Arc) -> Response anyhow::Result<()> { - info!("requested file {}", filename); +// TODO: delete this function +// // debug only +// async fn download_file(filename: &str) -> anyhow::Result<()> { +// info!("requested file {}", filename); - let from_prefix: &str = "/tmp"; //debug only - let to_prefix = "/home/anastasia/work/neon/pg_install/v15/"; +// let from_prefix: &str = "/tmp"; //debug only +// let to_prefix = "/home/anastasia/work/neon/pg_install/v15/"; - if filename.ends_with(".so") { - info!("requested file is a shared object file {}", filename); +// if filename.ends_with(".so") { +// info!("requested file is a shared object file {}", filename); - let from_path = Path::new(from_prefix).join("lib").join(filename); - let to_path = Path::new(to_prefix).join("lib/postgresql/").join(filename); +// let from_path = Path::new(from_prefix).join("lib").join(filename); +// let to_path = Path::new(to_prefix).join("lib/postgresql/").join(filename); - info!( - "copying file {} from {} to {}", - filename, - from_path.display(), - to_path.display() - ); +// info!( +// "copying file {} from {} to {}", +// filename, +// from_path.display(), +// to_path.display() +// ); - fs::copy(from_path, to_path)?; - } else { - info!("requested all extension files with prefix {}", filename); +// fs::copy(from_path, to_path)?; +// } else { +// info!("requested all extension files with prefix {}", filename); - let from_path = Path::new(from_prefix).join("share/extension/"); - let to_path = Path::new(to_prefix).join("share/postgresql/extension/"); +// let from_path = Path::new(from_prefix).join("share/extension/"); +// let to_path = Path::new(to_prefix).join("share/postgresql/extension/"); - info!( - "copying files from {} to {}", - from_path.display(), - to_path.display() - ); +// info!( +// "copying files from {} to {}", +// from_path.display(), +// to_path.display() +// ); - for file in fs::read_dir(from_path.clone()).unwrap().flatten() { - let fname = file.file_name().into_string().unwrap(); +// for file in fs::read_dir(from_path.clone()).unwrap().flatten() { +// let fname = file.file_name().into_string().unwrap(); - if fname.starts_with(filename) && fname.ends_with(".sql") { - info!( - "copying file {} from {} to {}", - fname, - from_path.display(), - to_path.display() - ); +// if fname.starts_with(filename) && fname.ends_with(".sql") { +// info!( +// "copying file {} from {} to {}", +// fname, +// from_path.display(), +// to_path.display() +// ); - fs::copy(file.path(), to_path.join(fname))?; - } - } - } +// fs::copy(file.path(), to_path.join(fname))?; +// } +// } +// } - Ok(()) -} +// Ok(()) +// } async fn handle_configure_request( req: Request, diff --git a/control_plane/src/endpoint.rs b/control_plane/src/endpoint.rs index 91ec76cd7d..c0d34ec619 100644 --- a/control_plane/src/endpoint.rs +++ b/control_plane/src/endpoint.rs @@ -418,9 +418,6 @@ impl Endpoint { anyhow::bail!("The endpoint is already running"); } - // ALEK: this is it - // How to tet remote-ext-config into here? - // Slurp the endpoints//postgresql.conf file into // memory. We will include it in the spec file that we pass to // `compute_ctl`, and `compute_ctl` will write it to the postgresql.conf @@ -496,10 +493,8 @@ impl Endpoint { // Launch compute_ctl println!("Starting postgres node at '{}'", self.connstr()); - println!("alek REMOTESTORAGE logfile {:?}", logfile); let mut cmd = Command::new(self.env.neon_distrib_dir.join("compute_ctl")); - // TODO: alek right here cmd.args(["--http-port", &self.http_address.port().to_string()]) .args(["--remote-ext-config", remote_ext_config]) .args(["--pgdata", self.pgdata().to_str().unwrap()]) diff --git a/libs/remote_storage/src/s3_bucket.rs b/libs/remote_storage/src/s3_bucket.rs index c7f40487ec..43d818dfb9 100644 --- a/libs/remote_storage/src/s3_bucket.rs +++ b/libs/remote_storage/src/s3_bucket.rs @@ -115,9 +115,9 @@ pub(super) mod metrics { /// AWS S3 storage. pub struct S3Bucket { - pub client: Client, - pub bucket_name: String, // TODO: undo making these public - pub prefix_in_bucket: Option, + client: Client, + bucket_name: String, + prefix_in_bucket: Option, max_keys_per_list_response: Option, // Every request to S3 can be throttled or cancelled, if a certain number of requests per second is exceeded. // Same goes to IAM, which is queried before every S3 request, if enabled. IAM has even lower RPS threshold.