From 73f926c39a606ab119e080d542bc103d5c402c56 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 2 Sep 2022 13:13:42 +0300 Subject: [PATCH] Return safekeeper remote storage logging during downloads --- safekeeper/src/wal_backup.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/safekeeper/src/wal_backup.rs b/safekeeper/src/wal_backup.rs index a15ba02863..5c6991c196 100644 --- a/safekeeper/src/wal_backup.rs +++ b/safekeeper/src/wal_backup.rs @@ -437,16 +437,23 @@ pub async fn read_object( file_path: PathBuf, offset: u64, ) -> anyhow::Result>> { - let download = REMOTE_STORAGE + let storage = REMOTE_STORAGE .get() .context("Failed to get remote storage")? .as_ref() - .context("No remote storage configured")? + .context("No remote storage configured")?; + + info!( + "segment download about to start for local path {} at offset {}", + file_path.display(), + offset + ); + let download = storage .download_storage_object(Some((offset, None)), &file_path) .await .with_context(|| { format!( - "Failed to open WAL segment download stream for local storage path {}", + "Failed to open WAL segment download stream for local path {}", file_path.display() ) })?;