Skip to content

Commit

Permalink
Fix parsing bug with Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
arpad-m committed Nov 19, 2024
1 parent 9b6af2b commit 4750f02
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions storage_scrubber/src/metadata_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub async fn stream_tenant_shards<'a>(

first_part
.parse::<TenantShardId>()
.with_context(|| format!("Incorrect entry id str: {first_part}"))
.with_context(|| format!("Incorrect tenant entry id str: {first_part}"))
})
.collect::<Vec<_>>();

Expand Down Expand Up @@ -114,9 +114,10 @@ pub async fn stream_tenant_timelines<'a>(
prefix.get_path().as_str().strip_prefix(prefix_str)
})
.map(|entry_id_str| {
entry_id_str
let first_part = entry_id_str.split('/').next().unwrap();
first_part
.parse::<TimelineId>()
.with_context(|| format!("Incorrect entry id str: {entry_id_str}"))
.with_context(|| format!("Incorrect timeline entry id str: {entry_id_str}"))
});

for i in new_entry_ids {
Expand Down

0 comments on commit 4750f02

Please sign in to comment.