Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
arpad-m committed Oct 17, 2024
1 parent aee9795 commit b630c9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions pageserver/src/tenant/remote_timeline_client/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ use utils::pausable_failpoint;
use super::index::{IndexPart, LayerFileMetadata};
use super::manifest::TenantManifest;
use super::{
parse_remote_index_path, remote_index_path, remote_initdb_archive_path, remote_initdb_preserved_archive_path, remote_tenant_manifest_path, remote_tenant_path, FAILED_DOWNLOAD_WARN_THRESHOLD, FAILED_REMOTE_OP_RETRIES, INITDB_PATH
parse_remote_index_path, remote_index_path, remote_initdb_archive_path,
remote_initdb_preserved_archive_path, remote_tenant_manifest_path, remote_tenant_path,
FAILED_DOWNLOAD_WARN_THRESHOLD, FAILED_REMOTE_OP_RETRIES, INITDB_PATH,
};

///
Expand Down Expand Up @@ -371,7 +373,8 @@ pub async fn do_download_tenant_manifest(
let generation = Generation::none();
let remote_path = remote_tenant_manifest_path(tenant_shard_id, generation);

let tenant_manifest_bytes = do_download_remote_path_retry_forever(storage, &remote_path, cancel).await?;
let tenant_manifest_bytes =
do_download_remote_path_retry_forever(storage, &remote_path, cancel).await?;

let tenant_manifest: TenantManifest = serde_json::from_slice(&tenant_manifest_bytes)
.with_context(|| format!("deserialize tenant manifest file at {remote_path:?}"))
Expand All @@ -389,7 +392,8 @@ async fn do_download_index_part(
) -> Result<(IndexPart, Generation), DownloadError> {
let remote_path = remote_index_path(tenant_shard_id, timeline_id, index_generation);

let index_part_bytes = do_download_remote_path_retry_forever(storage, &remote_path, cancel).await?;
let index_part_bytes =
do_download_remote_path_retry_forever(storage, &remote_path, cancel).await?;

let index_part: IndexPart = serde_json::from_slice(&index_part_bytes)
.with_context(|| format!("deserialize index part file at {remote_path:?}"))
Expand Down
2 changes: 1 addition & 1 deletion pageserver/src/tenant/remote_timeline_client/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ impl TenantManifest {
pub fn to_s3_bytes(&self) -> serde_json::Result<Vec<u8>> {
serde_json::to_vec(self)
}
}
}
3 changes: 2 additions & 1 deletion pageserver/src/tenant/remote_timeline_client/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ use super::index::IndexPart;
use super::manifest::TenantManifest;
use super::Generation;
use crate::tenant::remote_timeline_client::{
remote_index_path, remote_initdb_archive_path, remote_initdb_preserved_archive_path, remote_tenant_manifest_path,
remote_index_path, remote_initdb_archive_path, remote_initdb_preserved_archive_path,
remote_tenant_manifest_path,
};
use remote_storage::{GenericRemoteStorage, RemotePath, TimeTravelError};
use utils::id::{TenantId, TimelineId};
Expand Down

0 comments on commit b630c9c

Please sign in to comment.